Hi, ssyazmd. The problem with testing for what kind of finsih is on something is that you can determine if a finish is a shellac or lacquer pretty easily. Varnish is harder to tell. The real problem is that there is no good test for polyurethane so you have to rule everything else out first. That's why it is called the "what it isn't" test when you suspect that it is probably poly. You can tell a water based poly right off if you know what you are looking for but it does take a little experience.
Unless you have old and expensive hardwood moldings, I would sure not spend a lot of time and money trying to refinish them. You can try to blend the stains and put on a new coat of poly but I would sure try one or 2 of the small "magic marker" sizes stain pens first or one of the little bottles of stain colored wax fillers from Minwax before I got too involved in this.