PsiExpression (PsiIfStatement ifStatement) { final PsiExpression condition = PsiUtil.skipParenthesizedExprDown(ifStatement.getCondition()); if (condition instanceof PsiPolyadicExpression polyadicExpression) { if (JavaTokenType.OROR.equals(polyadicExpression.getOperationTokenType())) { for (PsiExpression operand : polyadicExpression.getOperands()) { final PsiExpression nullCheckedExpression = SwitchUtils.findNullCheckedOperand(PsiUtil.skipParenthesizedExprDown(operand)); if (nullCheckedExpression != null) return nullCheckedExpression; } } } final PsiExpression nullCheckedOperand = SwitchUtils.findNullCheckedOperand(condition); if (nullCheckedOperand != null) return nullCheckedOperand; final PsiStatement elseBranch = ifStatement.getElseBranch(); if (elseBranch instanceof PsiIfStatement) { return findNullCheckedOperand((PsiIfStatement)elseBranch); } else { return null; } }