What if type(badge["badge"]) is not dict?