log the message-id only if non-null