python skip if key not in dict