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, 'concurrency' ) ) {
		opts.concurrency = options.concurrency;
		if ( !isPositiveInteger( opts.concurrency ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a positive integer. Option: `%s`.', 'concurrency', opts.concurrency ) );
		}
	}
	if ( hasOwnProp( options, 'workers' ) ) {
		opts.workers = options.workers;
		if ( !isPositiveInteger( opts.workers ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a positive integer. Option: `%s`.', 'workers', opts.workers ) );
		}
	}
	if ( hasOwnProp( options, 'cmd' ) ) {
		opts.cmd = options.cmd;
		if ( !isString( opts.cmd ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'cmd', opts.cmd ) );
		}
	}
	if ( hasOwnProp( options, 'ordered' ) ) {
		opts.ordered = options.ordered;
		if ( !isBoolean( opts.ordered ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'ordered', opts.ordered ) );
		}
	}
	if ( hasOwnProp( options, 'uid' ) ) {
		opts.uid = options.uid;
		if ( !isNonNegativeInteger( opts.uid ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a nonnegative integer. Option: `%s`.', 'uid', opts.uid ) );
		}
	}
	if ( hasOwnProp( options, 'gid' ) ) {
		opts.gid = options.gid;
		if ( !isNonNegativeInteger( opts.gid ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a nonnegative integer. Option: `%s`.', 'gid', opts.gid ) );
		}
	}
	if ( hasOwnProp( options, 'maxBuffer' ) ) {
		opts.maxBuffer = options.maxBuffer;
		if ( !isNonNegativeInteger( opts.maxBuffer ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a nonnegative integer. Option: `%s`.', 'maxBuffer', opts.maxBuffer ) );
		}
	}
	return null;
}
Validates function options.

@private
@param {Object} opts - destination object
@param {Options} options - options to validate
@param {string} [options.cmd] - executable file/command
@param {PositiveInteger} [options.concurrency] - number of scripts to execute concurrently
@param {PositiveInteger} [options.workers] - number of workers
@param {boolean} [options.ordered] - boolean indicating whether to preserve the order of script output
@param {NonNegativeInteger} [options.uid] - process user identity
@param {NonNegativeInteger} [options.gid] - process group identity
@param {NonNegativeInteger} [options.maxBuffer] - max child process `stdio` buffer size
@returns {(Error|null)} error or null

@example
var opts = {};
var options = {
    'concurrency': 4,
    'workers': 2
};
var err = validate( opts, options );
if ( err ) {
    throw err;
}