Handle NULL strings appropriately