prevent NPE in MMS logic

Fixes #1434
// FREEBIE
Merge pull request #1437 from mcginty/mms-npe

prevent NPE in MMS logic