Checks two type references for equality. May only be used with resolved type references.
a type reference
true if this type reference is equal to type2, false otherwise