redefine isOfType() to use real types instead of names for #156
Use new isOfType with types instead of names
Fix TypeCategory to use new type scheme