Check whether data is non-null and contains msg
Merge pull request #23 from msgodf/fix-null-messages

Check whether data is non-null and contains msg