Take all the covers/panels off -- in most uprights and spinets that's pretty easy -- and, using a good strong flashlight, look around. Dust? No problem. Even a few mouse droppings, no problem. Mold? Forget it. Mildew, unless it's minor, forget it. Really grubby? Forget it. Look at the hammers and dampers. They may be discoloured, but shouldn't be really off colour -- or have really deep string marks.
Try the piano. The action may be a bit noisy (and the resulting "music" pretty weird) but it should be reasonably even, and the action should feel reasonably good. A few somewhat sticky notes aren't really a problem if the instrument hasn't been used much. However, a really really bad note -- or even more so a cluster of bad notes (say for example, an A, B flat, B, C right together) may indicate problems with the pin board.
Look at the sounding board. Cracks are astonishingly hard to see -- but if you see an obvious one, I'd forget it. Look at all the strings -- broken strings are not good.
Bottom line: in most areas, used uprights are pretty common and pretty inexpensive, so unless you fall in love with a particular instrument, there's no point in accepting things which aren't good.