 
     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)->


    @nodes[@getNodeId nodeData] = {}

    if options.putDepthInfo
      if @nodes[@getNodePId nodeData]
        nodeData.depth = @nodes[@getNodePId(nodeData)].getData().depth + 1
      else
        nodeData.depth = 0
