Add support for new tree operation - Lowest common ancestor

This operation finds the node which is common direct/un-direct parent.
Add check for Null input values