python check if dict in list of dicts