we can change this to `unless (enum_values.has_key?(value) && enum_values.has_value?(value))`
to avoid double negation.