getErrorFromFunctionOrString = (error, path, value) => {
  if (isFunction(error)) {
    return error(path, value);
  }
  return error;
}
If the error is function, calls this function with two arguments: path and value
and returns the result. If error is string, just returns it.

@param {Function|string} error representation of error
@param {string} path
@param {any} value
@returns {String}