added typecheck for struct in equality op