boolean (@NotNull PsiElement element) { PsiElement firstChild = element.getFirstChild(); PsiElement lastChild = element.getLastChild(); return firstChild != null && "{".equals(firstChild.getText()) && lastChild != null && "}".equals(lastChild.getText()); }