if in more pythonic than except KeyError