boolean (PsiExpression expression) { if (expression instanceof PsiBinaryExpression binaryExpression) { final IElementType tokenType = binaryExpression.getOperationTokenType(); if (!tokenType.equals(JavaTokenType.EQEQ)) { return false; } final PsiExpression lhs = binaryExpression.getLOperand(); final PsiExpression rhs = binaryExpression.getROperand(); if (rhs == null) { return false; } final PsiType type = lhs.getType(); return type != null && TypeConversionUtil.isPrimitiveAndNotNullOrWrapper(type); } return EqualityCheck.from(expression) != null; }