python check if key in list of dicts