Fix thrown exceptions when node.id was undefined.