Update type kind according to spec
Refactor to use TypeInfo in various checks