A stereotype is typically an over-generalised view
of a group of people, as viewed, often, from the point of view of the opposite stereotype.
Thus we find that men are logical and women are caring; dogs are faithful and cats are independent; teenagers are irresponsible whilst older people are sensible; oh, and men are stupid and women are a bit mad.
One can find any amount of politically correct and probably AI-generated gobbledygook about the mental health repercussions and long term deleterious effects of the use of stereotypes, alongside much valid and serious discussion of the potentially harmful effects of prejudicial treatment of a group based upon uninformed preconceptions.
Which is, of course, to say that it is all about context.
Stereotypes are the basis of a large amount of humour: Irish people are a bit dim, Scots are tight (in both senses), Jews are good with money, the French surrender easily, Germans are humourless - the list goes on.
It all depends who is speaking: If one is being self-deprecating it's generally seen as being OK, but if one tells a joke at dinner which has, as its subject, (not its target mind) a race which is represented at the table, the low whistle of the cold wind rolling through the resultant silence can be excruciating for all concerned. I know because I've done it.
On the other hand nobody could send up the Māori culture like Billy T James. And Henning Wehn describes his occupation of being a German comedian as "Not the easiest of jobs". As a newcomer to NZ in 1980 I was playing a gig at the Poenamo (pub on the North Shore) and recounted a joke to an audience full of rugby players which had as its premise the concept that a New Zealand brain in a second hand store would fetch a higher price because it had hardly been used. They didn't like it, and during my next break a couple of them quite literally threatened to do do me physical harm if I repeated anything similar.
People who get offended at jokes are often (as in this case) confusing the subject with the target. Ricky Gervais offends people on a regular basis, and yet is able to defend every one of his jokes on an intellectual basis such that the target is the thing being ridiculed, no matter the subject. Stephen Fry's response to the taking of offence is not printable here.
So what's my point?
I guess it is this:
We don't, or shouldn't, exist in a state of pre-emptive aggression. We all have a responsibility to be as emotionally intelligent as we can be, without assuming the worst of each other.