It normally comes down to how much you are willing to spend. Ride the bike long enough to heat it up to operating temperature. Then, kill it and start it a few times. If the valves are within tolerance, it should start easily when hot. Both my YZ and WR are easy to start hot. It shouldnt make any unusual pinging noises either. There is a whole list of other things you should look for like rotor wear, peg wear, and most importantly, frame and engine cover wear which will give you an idea of the hours.