Now you have noticed, and identified a possible threat. Now what do you do? Do you pull your Jackie Chan inspired fists of fury in them? No, any movements you make whether combative or not, should have some reason to them. Fact is the person could be wanting to give you a business card, or get you to vote, or maybe they are a passerby that happens to have a posture that is alarming you.
The best thing to do is stop them at as much distance as possible. Make eye contact and ask them what they want. Be as vocal as possible while being easy to understand. Let them know you are not an easy target and if they are a predator they should choose someone else as prey. If they advance further, take up a defencive posture. If you are armed put your hand on the weapon and continue to be vocal. "Stop right there!!" "I am armed and don't come any closer!!!" etc... Anyone who continues to advance after that point is surely a threat and defencive action can be administered.
Don't concern yourself with whether the person can be a good guy, if they are entering your personal space they should back off. If it turns out that they aren't a threat then they probably stopped before you took up a defencive posture and they will be on their way, you may have made a fool of yourself but you won't likely see them again so there really isn't any harm.