Fixed bug where the isNodeExists function was returning an array instead of a Node object.