Made a small change here to allow for an undefined data.badge.categories, which happens if communicated with a badgekit-api that doesn't yet know about categories (which is currently the case).