python check if key in list of dictionaries