There are some stereotypes that exist for a reason and are funny to point out that don't really harm anybody: like all French people wear scarves.
So when Jerry Seinfeld had Gad Elmaleh on an episode of Comedians in Cars Getting Coffee and noticed he was wearing a scarf, he went on a whole thing about it and it was great, both him and Gad had a wonderful laugh about it.
Finding what's truly funny about a stereotype in a comedy bit, however, is one thing, especially when a lot of people perceive it to be true. But then there are stereotypes that are just not true and the only reason people refer to them or bring them up are in a cheap attempt to be funny. One such stereotype is the misconception that women are statistically worse drivers than men.