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, '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, 'csl' ) ) {
		opts.csl = options.csl;
		if ( !isString( opts.csl ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'csl', opts.csl ) );
		}
	}
	return null;
}
Validates function options.

@private
@param {Object} opts - destination object
@param {Options} options - function options
@param {string} [options.database] - path to a bibliography database file
@param {string} [options.csl] - path to a Citation Style Language file
@returns {(Error|null)} error object or null

@example
var opts = {};
var options = {
    'database': '/foo/bar/baz.bib',
    'csl': '/foo/bar/baz.csl'
};

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