Fixed minor oversight, Enum#valueOf doesn't return null values.
It throws IllegalArgumentException.