For getting array length, `count = (teams && teams.length) || 0` might be better? Or if you want to use lodash `_.size(teams)` will take care of everything