more consistent handling of illegal types