@Override
    public void visitConditionalExpression(@NotNull GrConditionalExpression expression) {
      super.visitConditionalExpression(expression);
      GrExpression condition = expression.getCondition();
      final GrExpression thenBranch = expression.getThenBranch();
      final GrExpression elseBranch = expression.getElseBranch();
      if (thenBranch == null || elseBranch == null) {
        return;
      }
      if (SideEffectChecker.mayHaveSideEffects(condition)) {
        return;
      }
      condition = (GrExpression)PsiUtil.skipParentheses(condition, false);
      if (!(condition instanceof GrBinaryExpression binaryCondition)) {
        return;
      }
      final GrExpression lhs = binaryCondition.getLeftOperand();
      final GrExpression rhs = binaryCondition.getRightOperand();
      if (rhs == null) {
        return;
      }
      if (GrInspectionUtil.isInequality(binaryCondition) && GrInspectionUtil.isNull(elseBranch)) {
        if (GrInspectionUtil.isNull(lhs) && isCallTargeting(thenBranch, rhs) ||
            GrInspectionUtil.isNull(rhs) && isCallTargeting(thenBranch, lhs)) {
          registerError(expression);
        }
      }

      if (GrInspectionUtil.isEquality(binaryCondition) && GrInspectionUtil.isNull(thenBranch)) {
        if (GrInspectionUtil.isNull(lhs) && isCallTargeting(elseBranch, rhs) ||
            GrInspectionUtil.isNull(rhs) && isCallTargeting(elseBranch, lhs)) {
          registerError(expression);
        }
      }
    }
@Override
    public void visitConditionalExpression(@NotNull GrConditionalExpression expression)