Update hasType to work with any number of types