def validate_type(arg, types):
    """
    >>> types = {'string': 'String'}
    >>> validate_type('string', types)
    'String'
    >>> try:
    ...     validate_type('bbb', types)
    ... except:
    ...     pass
    Error: Field type error, bbb
    """
    if arg not in types:
        print(f'Error: Field type error, {arg}')
        exit(1)
    return types.get(arg)
