[GEOS-6697] Avoid adding null messages in exception reports