Protect against empty groups and messages