how about this `result_dict['type'] = pkg.type or u'dataset'`