Services like Carfax are pretty good for identifying VIN numbers which were written off as totalled. It might not identify a car which was in a minor fender-bender, but it will generally tell you if your car was written off due to a flood or something like that. If you're buying a used vehicle from a place that buys cars in mass bulk, it's an excellent precaution.
On any used car you buy, check the VIN number in several locations--not only the one on the dash behind the windshield, but the ones under the hood and in the trunk at a minimum. If they don't match, don't buy the car, no matter how plausible the explanation sounds. It isn't worth the risk.
Keep in mind if you make use of Carfax most likely it'll return nothing more than the names of previous owner(s). If you're okay with parting with $20 for what will likely be no result, by all means spend it. Heck, talk the guy you're buying the car from down another $20 to pay for it.
J_A_B