Do you tell your kids not to?

My cousin was telling her daughter how it isn't safe to talk to strangers, but I remember reading somewhere that it is safer for them to be sociable but obviously still warning them of the dangers (you know what I mean, don't you?)...........any input?