 
     o = @getOptions()
     listToBeAdded = @listControllers[id].getView()
-    if nodeView?.$?
+    if nodeView
       nodeView.$().after listToBeAdded.$()
       listToBeAdded.parentIsInDom = yes
       listToBeAdded.propagateEvent KDEventType: 'viewAppended'


  expand:(nodeView)->

    if nodeView?.getData?
      nodeData = nodeView.getData()
      nodeView.expand()
      @listControllers[@getNodeId nodeData]?.getView().expand()

  collapse:(nodeView)->


  addNode:(nodeData, index)->

    nodeData = @repairIds nodeData
    return unless nodeData
    @getData().push nodeData
    @addIndexedNode nodeData
