python check if value in list of dictionaries