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, 'out' ) ) {
		opts.out = options.out;
		if ( !isString( opts.out ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'out', opts.out ) );
		}
	}
	if ( hasOwnProp( options, 'title' ) ) {
		opts.title = options.title;
		if ( !isString( opts.title ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'title', opts.title ) );
		}
	}
	if ( hasOwnProp( options, 'tests' ) ) {
		opts.tests = options.tests;
		if ( !isString( opts.tests ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'tests', opts.tests ) );
		}
	}
	if ( hasOwnProp( options, 'benchmarks' ) ) {
		opts.benchmarks = options.benchmarks;
		if ( !isString( opts.benchmarks ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'benchmarks', opts.benchmarks ) );
		}
	}
	if ( hasOwnProp( options, 'source' ) ) {
		opts.source = options.source;
		if ( !isString( opts.source ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'source', opts.source ) );
		}
	}
	if ( hasOwnProp( options, 'head' ) ) {
		opts.head = options.head;
		if ( !isString( opts.head ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'head', opts.head ) );
		}
	}
	if ( hasOwnProp( options, 'prepend' ) ) {
		opts.prepend = options.prepend;
		if ( !isString( opts.prepend ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'prepend', opts.prepend ) );
		}
	}
	if ( hasOwnProp( options, 'append' ) ) {
		opts.append = options.append;
		if ( !isString( opts.append ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'append', opts.append ) );
		}
	}
	if ( hasOwnProp( options, 'fragment' ) ) {
		opts.fragment = options.fragment;
		if ( !isBoolean( opts.fragment ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'fragment', opts.fragment ) );
		}
	}
	return null;
}
Validates function options.

@private
@param {Object} opts - destination object
@param {Options} options - function options
@param {string} [options.out] - output file path
@param {string} [options.tests] - tests URL
@param {string} [options.benchmarks] - benchmarks URL
@param {string} [options.source] - source URL
@param {string} [options.title] - HTML title
@param {string} [options.head] - content to insert into HTML head
@param {string} [options.prepend] - content to prepend to HTML body
@param {string} [options.append] - content to append to HTML body
@param {boolean} [options.fragment] - output an HTML fragment
@returns {(Error|null)} error object or null

@example
var opts = {};
var options = {
    'title': 'beep boop'
};

var err = validate( opts, options );
if ( err ) {
   throw err;
}