It's not really so difficult, there are really only three standards; 25.4, 26 and 31.8
The 31.8's are huge and easy to tell from the other two, and the other two are so similar as to be a soda can shim away from one another. Unless you go really vintage and find a Cinelli stem, I think they are standardized pretty well.