function validateKey( obj ) {
	var prop;
	var i;
	if ( !hasOwnProp( obj, 'name' ) ) {
		return new TypeError( format( 'invalid option. Each key object must have a `name` property. Value: `%s`.', obj ) );
	}
	if ( !isString( obj[ 'name' ] ) ) {
		return new TypeError( format( 'invalid option. Each key object\'s `name` property must be a string. Value: `%s`.', obj ) );
	}
	for ( i = 0; i < KEY_BOOLEAN_PROPS.length; i++ ) {
		prop = KEY_BOOLEAN_PROPS[ i ];
		if ( hasOwnProp( obj, prop ) ) {
			if ( !isBoolean( obj[ prop ] ) ) {
				return new TypeError( format( 'invalid option. Each key object\'s `%s` property must be a boolean. Value: `%s`.', prop, obj ) );
			}
		}
	}
	return null;
}
Validates a key object.

@private
@param {Object} obj - key object
@returns {(Error|null)} error or null