MDL-47076 badges: Add checks to user fields during badges restoration

Change-Id: Ib429092fa5c125d1bf57f886036b7c6617f1ec6f