added null checks to teamsform