function validate( options ) {
	if ( hasOwnProp( options, 'cwd' ) ) {
		if ( !isString( options.cwd ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'cwd', options.cwd ) );
		}
	}
	if ( hasOwnProp( options, 'maxBuffer' ) ) {
		if ( !isPositiveInteger( options.maxBuffer ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a positive integer. Option: `%s`.', 'maxBuffer', options.maxBuffer ) );
		}
	}
	if ( hasOwnProp( options, 'timeout' ) ) {
		if ( !isNonNegativeInteger( options.timeout ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a nonnegative integer. Option: `%s`.', 'timeout', options.timeout ) );
		}
	}
	if ( hasOwnProp( options, 'throws' ) ) {
		if ( !isBoolean( options.throws ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'throws', options.throws ) );
		}
	}
	return null;
}
Validates a code block configuration object.

@private
@param {Options} options - configuration options
@param {string} [options.cwd] - current working directory of the child process
@param {PositiveInteger} [options.maxBuffer] - maximum buffer size for `stdout` and `stderr`
@param {NonNegativeInteger} [options.timeout] - maximum number of milliseconds allotted for the execution of each code block
@param {boolean} [options.throws] - boolean indicating whether a code block intentionally throws an error
@returns {(Error|null)} null or an error object

@example
var options = {
    'maxBuffer': 1024,
    'timeout': 60000
};
var err = validate( options );
if ( err ) {
    throw err;
}