Updated call sites where the node is null eventually; added assertions and debug statements