IdentityLink null-check

Required when custom identity links are used.
Merge pull request #396 from mikedias/patch-1

IdentityLink null-check