boolean (PsiStatement statement) { if (!(statement instanceof PsiIfStatement ifStatement)) { return false; } final PsiStatement elseBranch = ifStatement.getElseBranch(); return elseBranch == null || isIfStatementWithoutElse(elseBranch); }