[BadgeService] Test if user.badges is null before doing test on it