Fixed NPE when checking teams