Fixing issue 159

Issue caused when creating a directive using angular-ui-tree. Before content is successfully loaded, sending null or an empty object in the scope will cause the tree to break, until it is loaded correctly with data.