boolean (PsiElement element) { if (element instanceof LeafElement) { return true; } while (!(element instanceof LeafElement) && element != null) { element = getNextObject(element); } return element != null; }