I think that we need a check for data.badge.categories being defined here, as at least for now badgekit-api is not actually sending this information back.