We have a diverse set of friends, neighbors, fellow church members, and we picked our neighborhood in part because it is diverse - not just ethnically, but in ages, orientation, and income levels. If my oldest says anything intolerant, I can say "Well, what about so and so?" Or "How would you feel if someone said that to [insert name]"? It works.
I try to keep conversations age-appropriate, and I don't seek to censor anyone else unless they are being overtly bigoted in front of my kids. I respond to things like "Oh, he's all boy" with "Well, he's all [insert name]" in a sweet voice, so my boys get a strong message that THEY, not anyone else, get to define what it means to be "a boy" - but we don't need to fight about it.
Sometimes I have to gently but firmly redirect people who use words like "them" to talk about my middle son (who is Asian). "Oh, I thought THEY only had girls available for adoption..." and so on. I don't like these comments, but since they are not usually hostile, I'll briefly engage & educate the speaker. Some days, I just say, "No. Boys are less likely to be adopted all over the world" and walk off - my kinds need to know that they are NOT required to educate every fool who comes along, unless they feel like it.
My oldest nearly got in a fight at school (he's 6) recently because someone told him God was not real. We was still upset when he came home. I told him that some people don't believe in God and that it's OK - he doesn't need to argue with them - or prove anything. He can just believe what he believes and it doesn't matter what anyone else says about it.
And it's funny that his first brush with this being a problem would make us sound like conservative Christians, but we're UCC - very, VERY liberal Christians. And church is a big part of our family's "diversity training" too.