There's a definite problem with the phrase "I have a (insert adjective) friend". We have all heard those conversations where someone in the group says something that isn't necessarily politically correct, but says for example: "Hey, it's okay because I have a gay friend. I couldn't be homophobic." or "I have a Black friend, so I could never be racist". The problem with these phrases is that they are innately intolerant; if you have to make it known that you aren't being offensive, then you are probably being just that. This goes for any identity that could possibly fill in the blank.
Everyone loves to claim "the world is more accepting" or "we have come so far" but in reality, the same injustices are happening but in a new form. Just because people aren't being blatantly intolerant doesn't mean that these injustices have suddenly become extinct.
The phrase, "I have a ___ friend" is a microaggression. Microaggressions can be words or actions that are potentially offensive. By saying this phrase, you are insinuating that you can say offensive and intolerant things, but it doesn't carry as much weight because your friendship excuses the ill intent. Wrong. More often than not, these comments usually hurt more when they come from someone you love. Those phrases still carry the same weight. You are not only denying the feelings of the person that shares that identity but you are also continuing the cycle of intolerant behavior. Basically, you are the start gun to the "intolerant decathlon."
Think before you speak. If you have to justify that your speech isn't hateful or you have a pass because "your friend says it's okay, so you can say it" you might want to reconsider why some people allow it and others don't. Here's a thought, maybe because it could be potentially harmful to some people. My dad always reminds me that you learned everything you need in life in kindergarten, and one lesson was "think before you speak." Unfortunately, some people need a refresher course.