avoid null pointer dereferences to e->e_id when logging