Some of My Best Friends Are X/Analysis

In most contexts, this is enough of a Discredited Trope that genuinely straight uses are rare, at least in works of fiction, unless the author is really clueless. When this trope is invoked without ironic intent, whether by people in Real Life or In Universe by authors of fiction, it is typically used with a side of defensiveness by people who realize this is not generally considered to refute charges of discrimination or prejudice, and consider this unfair. This persistence of usage tends to take the trope from discredited to pet peeve for those that find the trope in itself dubious let alone its use by the more or less subtly racist, sexist, classist, etc. Do not expect these to be mollified by the introduction of a Black Best Friend or Pet Homosexual into the picture, most especially not if their characterization also invites Stop Being Stereotypical reactions.

Straight versions of the trope face three main kinds of problems:

1) As indicated above, it is strongly associated with no longer accepted biases and prejudices ("Some of My Best Friends are..." women/gay/members of ethnic minorities/etc.)

2) The belief that the minority friends are the "exception" to the person's prejudices, making it open season on everyone else in the group for not holding up to his ideals (ie, not being just like him).

3) More fundamentally, friendship does not guarantee an absence of prejudice, and the very act of thinking of someone not as your friend Bob or Alice, but as your [insert group name here] friend Bob or Alice, suggests bias and stereotyping. This may not apply if you find yourself faced with a group from a Planet of Hats, but Planet of Hats is itself a trope that relies on stereotyping, as in a lack of individual and other variety within a group. By extension, there is the worry that this trope is a way of claiming N Word Privileges by proxy, and the user may even use a form of proxy Boomerang Bigotry to this end ("Some of My Best Friends Are X, and they think that their group have these faults, too, so why can't I say it?")