void (@NotNull PsiBinaryExpression expression) { super.visitBinaryExpression(expression); if (!ComparisonUtils.isEqualityComparison(expression)) { return; } final PsiExpression rhs = expression.getROperand(); if (!hasNumberType(rhs)) { return; } final PsiExpression lhs = expression.getLOperand(); if (!hasNumberType(lhs)) { return; } if (isUniqueConstant(rhs) || isUniqueConstant(lhs)) return; DfNullConstantType leftConstant = tryCast(CommonDataflow.getDfType(lhs), DfNullConstantType.class); DfNullConstantType rightConstant = tryCast(CommonDataflow.getDfType(rhs), DfNullConstantType.class); DfaNullability leftNullability = leftConstant != null ? leftConstant.getNullability() : null; DfaNullability rightNullability = rightConstant != null ? rightConstant.getNullability() : null; if (leftNullability == DfaNullability.NULL || rightNullability == DfaNullability.NULL) return; Filter filter = new Filter(lhs, rhs); if (isOneOfVariablesDefinitelyNullAsPartOfBooleanExpression(expression, filter)) return; final PsiElement element = PsiTreeUtil.findFirstParent(expression, filter); final boolean isOneOfVariablesDefinitelyNull = element != null; if (isOneOfVariablesDefinitelyNull) return; registerError(expression.getOperationSign(), expression); }