Check if the node has children before accessing them