boolean (@NotNull PsiElement element) { if (!element.getNode().getElementType().equals(GroovyTokenTypes.kIF)) return false; final PsiElement parent = element.getParent(); if (!(parent instanceof GrIfStatement ifStatement)) return false; final GrIfStatement elseIf = getElseIf(ifStatement); return elseIf != null && checkIf(ifStatement) && checkIf(elseIf); }