python check if dict is in list of dicts