In “Suicide Squad,” the Season 6 finale of Brooklyn Nine-Nine, Detective Jake Peralta (Andy Samberg) lays out an elaborate scheme that includes a kidnapping, a false investigation, and a stealthily planted bug, all to take down the corrupt Commissioner of the New York Police Department.

For the kidnapping portion of the plan, his first instinct is to wear ski masks, but then he changes his mind mid-narrative. “Actually, scratch that. We’re not gonna use ski masks; we’ll use cool rubber masks!” he declares, his eyes alight.

“Ooh, we should be the ladies of The First Wives Club!” his always-enthusiastic partner and best friend, Charles Boyle (Joe Lo Truglio), chimes in. “I call Keaton!”

Now, at this point, this joke could go any number of ways. After six seasons of consistent character development, we know that The First Wives Club was definitely not what Jake — whose main aspiration in life is to morph into Bruce Willis’ character in Die Hard — had in mind when he suggested “cool rubber masks.” So it’s obvious from the setup that Jake is going to have to reject Charles’ proposal. The only question is how.

The lowest-hanging fruit would be for Jake to shame Charles for his feminine-skewing taste in movies. After all, Charles is a heterosexual adult man openly admiring a film about middle-aged women who have been rejected by their husbands. On many other shows, this is where the joke would go. Jake would dismiss Charles’ suggestion with a pointed jab at its lack of coolness, and possibly throw in a quip about having Charles’ Man Card revoked or some other such nonsense. Everyone would roll their eyes, Charles would be properly cowed, and the point would be clear: this is a cool heist, where only cool suggestions are welcome, and a lighthearted film that centers and targets women has no place here.

Or, in a kinder scenario, Jake could let Charles down gently, not openly poking fun at his choice of movie, but leaving it up to the viewer to determine what Jake really thought of Charles’ suggestion. For a minute, that’s where “Suicide Squad” seems to be headed. “We’re not going to do First Wives Club masks,” Jake says, shaking his head incredulously, before going on to explain that the reason he can’t take Charles’ suggestion is because The First Wives Club masks don’t, in fact, exist.

(Sidebar: Wouldn’t it be great if they did? A version of this episode with Jake, Charles, and Amy disguised as Bette Midler, Diane Keaton, and Goldie Hawn would’ve been amazing.)

It’s a practical objection, and one which spares Charles’ feelings, but the problem with this approach is that it’s not a punchline, which means that the joke was actually Charles’ suggestion of The First Wives Club in the first place. That brings us right back into “ha ha, it’s funny that he thinks a film about middle-aged women could be cool” territory. It’s essentially the same sexist joke as before, just smoothed out in order to seem nicer.

But Brooklyn Nine-Nine is better and smarter than this. It knows that while Charles’ suggestion of The First Wives Club feels kooky and funny at first glance, to let the joke rest there is to punch down, throwing both women and anyone whose tastes trend toward the gentler or more feminine under the bus. And Brooklyn Nine-Nine is not a show that punches down.

So it takes things a step further. After Jake has given his practical objection to Charles’ suggestion, he keeps going. “And also, yeah, Keaton is clearly the coolest one, and I don’t think it’s really fair that you just called her,” he rants, before realizing that he’s getting off-track and returning to the plan.

Not only is this an unexpectedly delightful place to take the joke, making the punchline sizzle that much more, but it completely reframes Jake’s irritation with Charles. He’s not bothered that Charles suggested that they dress up as middle-aged women; he’s annoyed that he claimed the best middle-aged woman before Jake got a chance to call dibs. Suddenly, The First Wives Club goes from being a movie that only Charles enjoys, to one that they both enjoy, and the idea of grown men dressing up as Diane Keaton goes from being a ridiculous suggestion, to one that is so appealing that these two guys are willing to fight over her.

With a single line of dialogue, Brooklyn Nine-Nine not only ratchets up this exchange from mildly amusing to laugh-out-loud funny, but also validates Charles’ unconventional tastes by lining Jake up right alongside him. It’s a clever way to subvert not only our expectations for sitcom humor, but our preconceived notions of masculinity as well.

Of course, this is par for the course for Brooklyn Nine-Nine, a show which has been hilariously — and occasionally poignantly — upending norms and challenging stereotypes since its first episode, which hints at Captain Holt’s (Andre Braugher) sexual orientation early on, only to have it immediately dismissed by Jake because Holt doesn’t fit into a typical comedic caricature of gayness. Ultimately, the pilot finds Jake forced to confront his own internalized prejudices when Holt not only confirms that he is gay (“I’m surprised you didn’t know. I don’t try to hide it,” Holt says, as Amy Santiago (Melissa Fumero) smirks knowingly, making it clear that this this isn’t really a reveal; Jake is simply the last one to the party), but also confides in them that his sexual orientation is precisely why it’s taken him so long to get his own command. Even now, Holt understands that his promotion has been partially the result of tokenism, but he’s not going to let that stand in his way, and is determined to do a good job.

There’s no joke there. Holt merely lays out how hard he’s worked to get to this point, and Jake sincerely apologizes for the rash assumptions he’s made, and then they both sit in silence for a few seconds, giving the moment the weight it deserves.

This is the beauty, and the genius, of Brooklyn Nine-Nine. It’s a show that has mastered the art of delivering a smart, well-crafted joke better than almost anything else on network TV, but perhaps even more importantly, it’s a show that knows exactly what sorts of things it’s not willing to make fun of in service of a few cheap laughs, and which moments resonate better without any punchline at all.

There’s no member of Brooklyn Nine-Nine’s diverse cast that is immune from gentle mocking, and countless jokes have been made about pretty much everyone and everything at this point, from Amy’s over-the-top fastidiousness, to Holt’s strict rigidity (the cold open of Season 6’s penultimate episode sees Jake “pranking” Holt by moving his podium half an inch to the right), to Terry’s (Terry Crews) yogurt obsession. But while every single character and quirk is fair game for good-natured ribbing, Brooklyn Nine-Nine has always been careful to sidestep the sort of humor that relies on tearing some people down in order to lift others up. Brooklyn’s ninety-ninth precinct has no patience for quips that rely on tired generalizations of marginalized groups, and has even been known to refrain from jokes entirely for a few beats when a character is feeling particularly vulnerable, like when Rosa (Stephanie Beatriz) came out to her parents, or when Terry was unjustly stopped by the police.