Less confusing error message when trying to set a nonexistent enum value