I concentrate on being a nice person and treating everyone nicely and bring my children up to be the same.
Then, IMO, you are doing your children a grave disservice. I'm reminded of the way my teachers told me never to use the word 'nice'. Their consensus was that there was always a better adjective to be found. This advice is urgently true in this context in particular: there are times when being 'nice' is the worst possible response to a situation, particularly when this situation involves the violation of another person's boundaries. And yes, unfortunately, this is a particular problem with men, who as a sex class often seem wilfully deaf and blind when a woman politely brushes them off. Egs from personal experience: 'what part of wearing earphones and reading on the Tube suggests I long for your company?', 'no, I'm minding my own business on my lunch hour and I don't want to have a personal conversation', 'no, I'm a stranger, why would I tell you my name', 'no, I will not tie your laces for you' (yes, a man really did ask me to do this in central London),' or even 'no, if your intentions are harmless then approach someone who isn't a lone woman', rinse and repeat ad nauseam.
Women simply do not do this. They just don't. And in these circumstances, when some man they don't know has approached a lone female they've already violated a particular code of conduct and disrespected someone else's boundaries (that person hadn't asked to be approached). Why the hell should that person then 'be nice' so that 'Friendly Male Stranger' can feel more comfortable at the expense of their own wellbeing and, possibly, safety?
It's also telling that a firm 'no' will quickly bring about a nasty response, or an assertion that the woman is being rude. Fine: it's not a cardinal sin. I'm perfectly comfortable with that.
#BeKind is an appalling - and I would say dangerous - message to relay to children in particular. It's opening the door for a potentially predatory adult to take advantage.