type_from_string_gently: make sure length matches