What
@dd14x has said. If it's a private sale, check the service record. I will shortly be selling a KTM with about 58,000 miles on it. It will get a full valve check "big" service from a dealer with a book stamp immediately before it goes on sale, so any buyer can see that all of the above has been checked and it has not turned a wheel since.
If the bike you're looking at hasn't had such a service immediately prior to sale, factor that into the price, or better still agree a price and say you'll buy it on provision that it receives a full dealer service first and a clean bill of health so there's no nasty surprises coming your way. At the most you're effectively knocking the seller down $500 for a guaranteed sale with peace of mind for both of you. He'll probably take it. If he refuses, and it coming up to service time, be suspicious.