Checks if s is an accepted values.
some context information for error messages
what to check
Exception if not accepted.
See Implementation
Checks if s is an accepted values.