boolean (GrExpression condition, GrExpression then) { if (!(condition instanceof GrBinaryExpression binaryExpression)) return false; if (GroovyTokenTypes.mNOT_EQUAL != binaryExpression.getOperationTokenType()) return false; GrExpression left = binaryExpression.getLeftOperand(); GrExpression right = binaryExpression.getRightOperand(); if (left instanceof GrLiteral && "null".equals(left.getText()) && right != null) { return PsiEquivalenceUtil.areElementsEquivalent(right, then); } if (right instanceof GrLiteral && "null".equals(right.getText())) { return PsiEquivalenceUtil.areElementsEquivalent(left, then); } return false; }