Other then looking for obvious signs like tire wear,are they all chewed up, or are they brand new which maybe means they were changed after being abused. Look at paint and body,see if owner cared for it,interior,etc. Otherwise, you should be pretty safe buying from a dealer and having a factory warranty still.
I bet the dealer would even rack it and put it in the air for you to look at undercarraige. Either way, a dealer has alot of liability,so i dont think they would sell you a bad car,unless they are a shady dealer.
Like others said, before you buy used,check out a left over new one, may get a smoking deal.