function validate( opts, options ) {
	if ( !isObject( options ) ) {
		return new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );
	}
	opts.uri = options.uri;
	if ( !isURI( opts.uri ) ) {
		return new TypeError( format( 'invalid option. `%s` option must be a valid URI. Option: `%s`.', 'uri', opts.uri ) );
	}
	opts.id = options.id;
	if ( !isString( opts.id ) ) {
		return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'id', opts.id ) );
	}
	opts.description = options.description;
	if ( !isString( opts.description ) ) {
		return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'description', opts.description ) );
	}
	if ( hasOwnProp( options, 'database' ) ) {
		opts.database = options.database;
		if ( !isString( opts.database ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'database', opts.database ) );
		}
	}
	if ( hasOwnProp( options, 'keywords' ) ) {
		opts.keywords = options.keywords;
		if ( !isStringArray( opts.keywords ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be an array of strings. Option: `%s`.', 'keywords', opts.keywords ) );
		}
	}
	return null;
}
Validates function options.

@private
@param {Object} opts - destination object
@param {Options} options - function options
@param {string} options.uri - link URI
@param {string} options.id - unique link identifier
@param {string} options.description - link description
@param {StringArray} [options.keywords] - link keywords
@param {string} [options.database] - path to a bibliography database file
@returns {(Error|null)} error object or null

@example
var opts = {};
var options = {
    'database': '/foo/bar/baz.json',
    'uri': 'https://stdlib.io/',
    'id': 'stdlib',
    'description': 'A standard library for JavaScript and Node.js.'
};

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