Harden against potential empty nodes in the map