Prevent duplicate Rows?

I have two tables

Locations - generally retail locations and restuarants that are our customers.
Contacts - the managers, GMs, Regional Managers, of those locations.

To build a new location row, I am using the native form with a whole lot of filtering and a workflow that uses AI to do a bunch of things for me.

It starts with either a business card upload or a manual input. If the business card is uploaded, AI reads the card and then creates the location row automatically. It sets the status of the customer and creates a new contact record in the contacts table.

It would be difficult, but not impossible to duplicate the location.

The contact record would be very easy to duplicate because people move from job to job and location to location often so it’s easy for us to scan a new business card and create a second contact for the same person at a different location.

Is there any way to check for the existence of the contact FIRST before creating a new row?

You could use a helper table to make a form that allow you to scan first, then computed columns would verify if a contact already exists and give you true/false value that you would be able to use in your workflow.