When debugging the code, I can see the exception has been thrown. The image above shows this. So, I know something has gone wrong in the library property and what I want to do is capture this error BEFORE hitting the line of code using the property and keep going along with the application.

Is there a way to check an object for exceptions and tell my code to skip over it or do whatever? For example: