This condition can be outside the try-except-block.