Dealer check is easy, call the dealer and give the VIN number and be nice to ask 2 questions: Does vehicle have full service history? And is this vehicle ever involved in any accident? Remember anything you force or act strong is "Not allowed" sir, so be really nice and seeking help with humble tone.
Al tayer is very strange dealer here to not to tell the service history details to it's owner itself (I have been told this on my first service on SZR branch after buying), so you won't get any details just by VIN number anyways, but you will get an answer: if car is "regularly" maintained or not.
Then call couple of good insurance and ask for quote with the VIN number, as now since few years insurance is centrally connected so any major accident or totalled history will flash in "most" of the good insurance company. If service agent refuse to offer insurance, then ask them the reason and they will disclose if car was total loss in the past or not.