python check if string in list of dictionaries