Error 500

Trying to get property 'teams' of non-object