Use an `if` condition instead of `try catch` logic.