} else if (children.getClass().isArray())
} else if (children != null && children.getClass().isArray())
    public static void createChildren(DefaultMutableTreeNode parent,                                      Object children)    {      if (children instanceof Hashtable)        {          Hashtable tab = (Hashtable) children;          Enumeration e = tab.keys();          while (e.hasMoreElements())             {              Object key = e.nextElement();              Object val = tab.get(key);              parent.add(new DynamicUtilTreeNode(key, val));            }        }      else if (children instanceof Vector)        {          Iterator i = ((Vector)children).iterator();          while (i.hasNext())            {              Object n = i.next();              parent.add(new DynamicUtilTreeNode(n,n));            }        }      else if (children.getClass().isArray())        {          Object[] arr = (Object[]) children;          for (int i = 0; i < arr.length; ++i)            parent.add(new DynamicUtilTreeNode(arr[i], arr[i]));      }    }