python check if string exists in list of dictionaries