def get_type_size(t):
    """Returns the size in bytes of a builtin type if available. Else None"""
    if t in ['int8', 'uint8', 'byte', 'bool', 'char']:
        return 1
    elif t in ['int16', 'uint16']:
        return 2
    elif t in ['int32', 'uint32', 'float32']:
        return 4
    elif t in ['int64', 'uint64', 'float64', 'time', 'duration']:
        return 8
    return None