function validate( opts, options ) {
	if ( !isObject( options ) ) {
		return new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );
	}
	opts.slug = options.slug;
	if ( !isString( opts.slug ) ) {
		return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'slug', opts.slug ) );
	}
	if ( hasOwnProp( options, 'token' ) ) {
		opts.token = options.token;
		if ( !isString( opts.token ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'token', opts.token ) );
		}
	}
	if ( hasOwnProp( options, 'useragent' ) ) {
		opts.useragent = options.useragent;
		if ( !isString( opts.useragent ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'useragent', opts.useragent ) );
		}
	}
	if ( hasOwnProp( options, 'actor' ) ) {
		opts.actor = options.actor;
		if ( !isString( opts.actor ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'actor', opts.actor ) );
		}
	}
	if ( hasOwnProp( options, 'branch' ) ) {
		opts.branch = options.branch;
		if ( !isString( opts.branch ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'branch', opts.branch ) );
		}
	}
	if ( hasOwnProp( options, 'event' ) ) {
		opts.event = options.event;
		if ( !isString( opts.event ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'event', opts.event ) );
		}
	}
	if ( hasOwnProp( options, 'status' ) ) {
		opts.status = options.status;
		if (
			!contains( STATUS_VALUES, opts.status ) &&
			!contains( CONCLUSION_VALUES, opts.status )
		) {
			return new TypeError( format( 'invalid option. `%s` option must be one of the following: "%s" or "%s". Option: `%s`.', 'status', STATUS_VALUES.join( '", "' ), CONCLUSION_VALUES.join( '", "'), opts.status ) );
		}
	}
	return null;
}
Validates function options.

@param {Object} opts - destination object
@param {Object} options - options to validate
@param {string} options.slug - GitHub slug (:owner/:repo)
@param {string} [options.token] - GitHub access token
@param {string} [options.useragent] - user agent string
@param {string} [options.actor] - only return workflow runs by the specified user
@param {string} [options.branch] - only return workflow runs associated with a branch
@param {string} [options.event] - only return workflow runs triggered by the specified event
@param {string} [options.status] - only return workflow runs with the specified check run status or conclusion
@returns {(Error|null)} error or null