- added a guard check to check when user is null