XX-11311: Multiple groups of users can cause problems when EN / DIS IM services

- additional checks to avoid NullPointerException if no user / group returned by mongo query