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

@private
@param {Object} opts - destination object
@param {Options} options - function options
@param {boolean} [options.objectMode] - specifies whether a stream should operate in object mode
@returns {(Error|null)} null or an error object

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