Fixed formatting of errors; checks for nil objects in User class