How can I click on a element while another element is not present

Hey,

A try catch helps to solve the issue. Thanks for your help!