Fixup: Check if either "root" or "node" are NULL, return NULL if.
Fix: Move check whether "*root" is NULL above calculations