identify the correpsonding internal SC2 game value for self.type's value

def gameValue(self):
        """identify the correpsonding internal SC2 game value for self.type's value"""
        allowed = type(self).ALLOWED_TYPES
        try:
            if isinstance(allowed, dict): # if ALLOWED_TYPES is not a dict, there is no-internal game value mapping defined
                return allowed.get(self.type.name)
        except: pass # None .type values are okay -- such result in a None gameValue() result
        return None