if (treeModel != null)
if (treeModel != null && treeModel.getRoot() != null)
  protected void updateLayoutCacheExpandedNodes()  {    if (treeModel != null)      updateExpandedDescendants(new TreePath(treeModel.getRoot()));  }