Given a thing type name, check to see if the given thing type exists

    Returns True if the given thing type exists and returns False if the
    given thing type does not exist.

    .. versionadded:: 2016.11.0

    CLI Example:

    .. code-block:: bash

        salt myminion boto_iot.thing_type_exists mythingtype

def thing_type_exists(thingTypeName,
            region=None, key=None, keyid=None, profile=None):
    '''
    Given a thing type name, check to see if the given thing type exists

    Returns True if the given thing type exists and returns False if the
    given thing type does not exist.

    .. versionadded:: 2016.11.0

    CLI Example:

    .. code-block:: bash

        salt myminion boto_iot.thing_type_exists mythingtype

    '''

    try:
        conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
        res = conn.describe_thing_type(thingTypeName=thingTypeName)
        if res.get('thingTypeName'):
            return {'exists': True}
        else:
            return {'exists': False}
    except ClientError as e:
        err = __utils__['boto3.get_error'](e)
        if e.response.get('Error', {}).get('Code') == 'ResourceNotFoundException':
            return {'exists': False}
        return {'error': err}