Handling empty nodes