validating user for calendar view

added a check to see if user is not null