ConditionalModel (@NotNull PsiConditionalExpression conditional) { PsiExpression condition = PsiUtil.skipParenthesizedExprDown(conditional.getCondition()); if (condition == null) return null; PsiExpression thenExpression = conditional.getThenExpression(); if (thenExpression == null) return null; PsiExpression elseExpression = conditional.getElseExpression(); if (elseExpression == null) return null; PsiType type = getType(condition, thenExpression, elseExpression); if (type == null) return null; return new ConditionalModel(condition, thenExpression, elseExpression, type); }