def is_html(response):
    """ Check if Flask response if of HTML type.

    Parameters
    ----------
        response: Flask response

    Returns
    -------
        True if valid False if not.
    """
    content_type = getattr(response, 'content_type', '')
    return 'text/html' in content_type.lower()
