Beef up typeService segment handling

There are a lot of nuances to the serialized segments that this tries to
handle (nulls not undefined for inf, null for empty vs missing for
full).  Submission of singletons is still an issue, however.