def analyze_result(typ, indicators, indicator_filter):
    """Check response from API"""
    no_of_indicators = len(indicators[typ])
    if no_of_indicators == 0:
        if indicator_filter:
            msg = 'check your filter.'
        else:
            msg = 'are there any?'
        raise SystemExit('No {} found - {}'.format(typ, msg))
    elif indicator_filter:
        msg = 'Found {} {} with filter {}'.format(no_of_indicators, typ,
            indicator_filter)
    else:
        msg = 'Found {} {}'.format(no_of_indicators, typ)
    return msg
