def try_decode(val):
    'bool, int, float, or str'
    if (val.upper() == 'FALSE'):
        return False
    elif (val.upper() == 'TRUE'):
        return True
    if val.isdigit():
        return int(val)
    if is_number(val):
        return float(val)
    return val
bool, int, float, or str
def try_decode(val):
    
    if (val.upper() == 'FALSE'):
        return False
    elif (val.upper() == 'TRUE'):
        return True
    if val.isdigit():
        return int(val)
    if is_number(val):
        return float(val)
    return val