The way he chose to combat racism (which existed as an actual hurdle early in his career):
Within the black community, [Bill Cosby] was criticized for not confronting racial issues. The truth was, Cosby had made a conscious decision to ignore race and stick to topics that were universally relatable. But not because he wasn’t interested in challenging stereotypes. “A white person listens to my act, and he laughs, and he thinks, Yeah, that’s the way I see it too,” he said. “OK. He’s white. I’m Negro. And we both see things the same way. That must mean that we are alike. Right?”
The whole article is a good read. Although I may be prejudiced, because I actually used to listen to the “To Russell” album on vinyl back in the day.