void (@NotNull PyBinaryExpression node) { final PyExpression rightExpression = node.getRightExpression(); if ((rightExpression instanceof PyReferenceExpression && PyNames.NONE.equals(rightExpression.getText())) || rightExpression instanceof PyNoneLiteralExpression) { final PyElementType operator = node.getOperator(); if (operator == PyTokenTypes.EQEQ || operator == PyTokenTypes.NE || operator == PyTokenTypes.NE_OLD) { PsiReference reference = node.getReference(); assert reference != null; PsiElement result = reference.resolve(); if (result == null || PyBuiltinCache.getInstance(node).isBuiltin(result)) { registerProblem(node, PyPsiBundle.message("INSP.comparison.with.none.performed.with.equality.operators"), new ComparisonWithNoneQuickFix()); } } } }