def _exist_key(key, **kwargs):
    """
    check whether key is exsit in the kwargs and kwargs[key] is not None.
    """
    is_exist = key in kwargs
    is_not_none = kwargs[key] is not None if is_exist else None

    return is_exist and is_not_none