function validate( opts, options ) {
	if ( !isObject( options ) ) {
		return new TypeError( 'invalid argument. Options argument must be an object. Value: `' + options + '`.' );
	}
	if ( hasOwnProp.call( options, 'basedir' ) ) {
		opts.basedir = options.basedir;
		if ( typeof opts.basedir !== 'string' ) {
			return new TypeError( 'invalid option. `basedir` option must be a string. Option: `' + opts.basedir + '`.' );
		}
	}
	if ( hasOwnProp.call( options, 'paths' ) ) {
		opts.paths = options.paths;
		if ( typeof opts.paths !== 'string' ) {
			return new TypeError( 'invalid option. `paths` option must be a string. Option: `' + opts.paths + '`.' );
		}
	}
	return null;
}
Validates function options.

@private
@param {Object} opts - destination object
@param {Options} options - function options
@param {string} [options.basedir] - base search directory
@param {string} [options.paths] - path convention
@returns {Error|null} error or null

@example
var options = {
    'basedir': '/beep/boop/foo/bar',
    'paths': 'win32'
};
var opts = {};
var err = validate( opts, options );
if ( err ) {
    throw err;
}