Make eu_value_type check for invalid values

This avoids the need for many eu_value_ok checks.