The offline message store will save every non-null Message object that it receives. This could include messages that do not have a body. Typical examples of these could be chat-state notification messages.
These messages should not be persisted in the offline message store, but ignored instead.
This should fix the problem: