Be more explicit about comparing

Only instances of identical classes should be compared.