def condv(key, dic, default='None'):
    """Helper Function to handle missing keys"""
    try:
        val = dic[key]
        if type(val) == list:
            if not val:
                return ''
            if len(val) == 1:
                return val[0]
            else:
                return ';'.join(val)
        else:
            return dic[key]
    except:
        return default
