identity comparison for guards to prevent infinite recursion