Support enums for non-enum types

Typelists are no longer enum types, but they need to be treated as enums
in webservices. This change allows typelists to be "marshalled" as
enums, even though they aren't technically enum types.