Check for null messages

This addresses the crash on the Markets window when parsing a null message.