Asserts that a value is one of the provided values.
Value to check
Array of allowed values
Optional
Error object or message to throw if the value is not one of the allowed values
Asserts that a value is one of the provided values.