I think that is really important. I always told my kids to trust their instincts about people. It was a little harder with DD who was anxious about just about anyone, but we talked about knowing what her normal anxiety felt like, versus something stronger/more/different. And then we backed her up when she was a toddler (too young to have even had the discussion) and freaked out by one particular neighbor of our in laws, or in second grade and scared of one particular substitute teacher, and when she was not comfortable in the kids' club on the Disney ship, etc.
We also spoke with the kids over the years about adults who harm kids. I tried to put it in perspective and explain they were not likely to ever be harmed, just like there are fire drills at schools but most kids never have an actual fire at their school---but just like fire drills it is good to know what to do just in case. I was especially careful to make sure they knew that adults who harm kids nearly ALWAYS try to convince the child not to tell. They might tell the child that they will hurt them or family or friends if they tell, or the adult might tell the child it is his/her fault for looking or acting a certain way, or the child might even think the thing feels good at some point and then the adult tells them that makes it their fault, etc. We stressed that these are things bad adults do to try to protect themselves--that it is NEVER the child's fault and adult will lie and tell them all sorts of things to try to cover up--and at the end of the day that is the biggest red flag of all--anything that an a child is told not to share with their parents or other trusted adults (a surprise, which they know will make the other adult happy and is only temporarily being kept secret, like a gift is different) means the adult KNOWs that they, the adult are doing something wrong and that our kids could always, always tell us about such things, could always and always should (but also that if they did not right away for any reason, that was still not their fault and they could still come to us whenever they realized).
I may be totally off base, but it seemed like a much better way to protect my children than to teach them to fear one gender, or keep them only with people we know well (since people you know well are often the abusers--and yes e told kids that too--and that those people will say the child will not be believed, and that we would believe them).