Added exception thrown if node passed to methods is null