use ``dict.get`` instead of a try/except