added hasType() method for typed assertions