python check if key value exists in list of dictionaries