If getting a latest unregistered JDM then check it's auction sheet.
If an old used one then just take any good mechanic and denter/painter with you and show him the car, they'll charge 1000-2000. Ask the mechanic to check the car it's engine and every mechanical things.
For denter/painter ask him to check for any repairs on body. They know better than us and if the car has been involved in an accident before, a good mechanic will easily recognise it and tell you.