function validate( opts, options ) {
	if ( !isPlainObject( options ) ) {
		return new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );
	}
	if ( hasOwnProp( options, 'invalid' ) ) {
		opts.invalid = options.invalid;
	}
	return null;
}
Validates function options.

@private
@param {Object} opts - destination object
@param {Options} options - function options
@param {*} [options.invalid] - return value when an input iterator yields a non-numeric value
@returns {(Error|null)} null or an error object

@example
var opts = {};
var options = {
    'invalid': NaN
};
var err = validate( opts, options );
if ( err ) {
    throw err;
}