If Record Exists Function

If Record Exists Function

Is there a quick and easy way to see if a record exists in a module in CRM.  I am writing some custom functions in CRM and have introduced some error checking.  Part of the error checking is to check related records exist (i.e. have not been deleted.)

What I am looking to do is

If Record Does NOT Exists in Leads using ID 123456 then I write to an error field in my system.

Just thought I would enquire to see if anyone knows a quick and easy way to check the existence of records by ID?

Any hep appreciated.  Thanks