It really comes down to the tone or the spirit of jokes.
Most gifted comedians have a way of cracking jokes about all races and also pointing out how so many stereotypes are ridiculous.
George Carlin was known for making racial comparison jokes. In the right setting most people are open to laughing at themselves minus racial slurs. It's probably best to avoid holocaust and slave jokes.
The only exception is if you are a member of the persecuted group.
In this era most racial jokes tend to involve people making fun of their own race and experiences they feel are relatable.
During this age of "political correctness" is probably best to stay away from racial humor altogether unless you're a professional comic who is known for poking fun at (everyone).
It's also very difficult to be "funny" in writing when it comes to racial topics. People have no way of knowing of hearing the tone of your voice or seeing your facial expressions which can illustrate you're "not serious" about what you said.
Every group who has been historically discriminated against or kept from sharing power or not seen as an equal may be sensitive to certain jokes. This would include women, Jews, Muslims, Gays, Latinos, Asians, Obese people. The more power one has the easier it is for them to laugh at themselves because they know (their reality) in society or image is in stark contrast to the joke being told. Women can usually get away telling dumb men or husband jokes because generally speaking men still run the world.
In most family sitcoms the dad is always the least informed in the household. The wife and the children are always able to manipulate him. He doesn't know how to cook or use a washing machine.
And yet you don't hear men proclaiming it's sexism. The reason why is because in reality most households do not contain a rambling idiot husband.