Apple Script Editor Syntax Errors

Hi good day and I am using the Apple Script Editor for finding the terminology dictionary of the type of application that is being scripted but if the application is not found then automatically syntax error will appear.

Error:
Syntax Error Expected "," or "j" but found property.
