lib/utils.js
function validateFn(fn, name) {
  if (typeof fn !== 'function') {
    throw new errors.ArgumentError(util.format('%s is not a function', name || 'callback'));
  }
  return fn;
}
function validateFn(fn, name) {
  if (typeof fn !== 'function') {
    throw new errors.ArgumentError(util.format('%s is not a function', name || 'callback'));
  }
  return fn;
}
Validates the provided parameter is of type function.
@param {Function} fn The instance to validate.
@param {String} [name] Name of the function to use in the error message. Defaults to 'callback'.
@returns {Function}