Get redis key type

    CLI Example:

    .. code-block:: bash

        salt '*' redis.type foo

def key_type(key, host=None, port=None, db=None, password=None):
    '''
    Get redis key type

    CLI Example:

    .. code-block:: bash

        salt '*' redis.type foo
    '''
    server = _connect(host, port, db, password)
    return server.type(key)