function validate( value ) {
	var type = typeof value;
	if (
		value === null ||
		(type !== 'object' && type !== 'function')
	) {
		return new TypeError( format( 'invalid argument. A provided constructor must be either an object (except null) or a function. Value: `%s`.', value ) );
	}
	return null;
}
Tests that a value is a valid constructor.

@private
@param {*} value - value to test
@returns {(Error|null)} error object or null

@example
var ctor = function ctor() {};

var err = validate( ctor );
// returns null

err = validate( null );
// returns <TypeError>