check for non-existant identity and connections.
Merge pull request #157 from AndreLesa/sms_users_bug_fix

check for non-existant identity and connections.