Play the amp and listen for eventual volume drops or strange noises (indicators for shot power tubes). You can also take a pencil and tap on the power tubes to check if they've gone micro-phonic. Shot power tubes doesn't equal broken amp at all, but you take that into consideration for the price.
Move all the pots and switches on the front and check if they work properly. If they'll get you scratching noises, then they should be cleaned up.
Check the FX loop too if you can. They often need some cleaning too on 5150s. It's a widespread issue.
The preamp tubes will mostly likely be fine but simply turn up the gain knob and see if you get lots of gain. 5150s have plenty. Additionally, you can also tap on them to check if they've gone microphonic. Doing that, it's normal to get a ringing sound. But if you get all kinds of loud cracks and so on, that's not okay.
You may also ask the seller if the amp has ever been used without a load or an inappropriate load and hope to get an honest answer.
Other than that, just turn it up and crank out some riffs. If it sounds good, it's good.