Back all type factories with a single global cache. Also, most of the type-inference interfaces now do not accept or return nulls.