I am considering buying a gun from someone either online or in person. How could I make sure the gun is not stolen prior to me paying for it and then how do I transfer ownership of the gun into my name?

Thanks