if ((path == null) || (treeModel.isLeaf(path.getLastPathComponent())))
if (path == null)
  public void expandPath(TreePath path)  {    // Don't expand if last path component is a leaf node.    if ((path == null) || (treeModel.isLeaf(path.getLastPathComponent())))      return;    try      {        fireTreeWillExpand(path);      }    catch (ExpandVetoException ev)      {        // We do nothing if attempt has been vetoed.      }    setExpandedState(path, true);    fireTreeExpanded(path);  }