def get_zone_id(zone_name, current_zones):
    """
    Returns the zone's id if it exists and is unique
    """
    zone_exists = False
    zone_id, msg = None, None
    zone_list = []
    for zone in current_zones:
        if zone['nickname'] == zone_name:
            zone_list.append(zone['id'])
    counter = len(zone_list)
    if counter == 0:
        msg = 'No matching zone found'
    elif counter == 1:
        zone_id = zone_list[0]
        zone_exists = True
    elif counter > 1:
        zone_id = None
        msg = (
            'Zone ID could not be returned as duplicate zone names were detected'
            )
    return zone_exists, msg, counter, zone_id
