void (@Nullable ASTNode anyElement) { if (anyElement == null) return; ASTNode root = anyElement; while (root.getTreeParent() != null) { root = root.getTreeParent(); } if (root instanceof CompositeElement) { checkSubtree((CompositeElement)root); } }