boolean (@NotNull PsiElement element) { if (!(element instanceof GrIfStatement ifStatement)) { return false; } final GrStatement thenBranch = ifStatement.getThenBranch(); if (thenBranch == null) { return false; } final GrStatement elseBranch = ifStatement.getElseBranch(); return elseBranch instanceof GrIfStatement; }