small bugfix in type equality checking function