Add isNode method.
Add getAllNodes method
Fix isLast method. Throw error if method is not node of tree.