making sure the team object is not null