boolean (PsiExpression expression) { if (!(expression instanceof PsiBinaryExpression binaryExpression)) { return false; } if (!ComparisonUtils.isEqualityComparison(binaryExpression)) { return false; } final PsiExpression rhs = binaryExpression.getROperand(); if (rhs == null) { return false; } final PsiExpression lhs = binaryExpression.getLOperand(); final PsiType lhsType = lhs.getType(); if (lhsType instanceof PsiPrimitiveType) { return false; } final PsiType rhsType = rhs.getType(); return !(rhsType instanceof PsiPrimitiveType); }