If a white person hears a rap song featuring the n-word, it isn't considered racist for him to sing along with it so long as the word is part of the song's lyrics, as defined by Chris Rock in his HBO special "Kill The Messenger."
"What are the Dr. Dre Rules? What are the rules when a Dr. Dre song comes on the radio or plays at a club, what is the procedure that goes into effect? Because sometimes I'm with my white friends and a Dr. Dre song comes on and there's a lot of 'niggers' in a Dr. Dre song. And they want to enjoy it, but they can't really enjoy it around me. So they start taking out the 'niggers' or mumbling the 'niggers' and it's just a sad sight to see. It's just sad to see a white person try to do a nigger-less rendition of a Dr. Dre song, it's just fuckin' depressing. And they're trying to rap along without saying 'nigger' and they're like 'Creeping down the backstreet on dees I got my glock cocked cause-I-don't-know-what-the fuck-to-say!' 'Tat-tat-tat like that, and I never hesitate to put a-ha-ha-ha-ha' But I know when I'm not there, they lean into that shit, 'he's not here, turn it up - down the backstreet on dees I got my glock cocked cause NIGGER!' 'Tat-tat-tat like that, and I never hesitate to put a NIGGER ON HIS BACK-AND KILL HIM, I HATE NIGGERS!' 'Hey man, that's not even in the song.' 'I got a little carried away, I'm sorry about that, they should put it in, they really should.' Don't worry white people, get your Dre on; get your Dre on, get your Jay on, get your Kanye on. It's alright, it's all good, it's okay; it's got to be in the song, though." -Chris Rock, "Kill The Messenger.