boolean (@Nullable Object node) { while (node != null) { if (node instanceof LoadingNode) return true; if (!(node instanceof DefaultMutableTreeNode)) return false; node = ((DefaultMutableTreeNode)node).getUserObject(); } return false; }