Robert Baril wasn’t sure he was ready for war. For his debut this past weekend as a featured comedian at a Wisconsin club, he had prepared fresh material inspired by recent terrorist attacks.

“But I’m not sure if I should do it,” said the Twin Cities-based performer, wondering late last week how a bit about identifying ISIS with nicknames that sound like your grandma’s bridge partners would go over with a still shellshocked audience.

In the aftermath of the Paris attacks, late-night talk show hosts are polishing their images as entertainment’s most comforting grief counselors, from CBS’ Stephen Colbert urging viewers to show their support by slapping on a beret to John Oliver raging against the ISIS machine on his expletive-friendly HBO program.

It’s comedy as comfort food — but only when served up by well-known personalities who long ago eclipsed network news anchors as the most trusted figures in America. For the vast majority of stand-ups in comedy clubs, addressing tragedy that evokes sorrow and fear can backfire.

Louis Lee, owner of Minneapolis’s Acme Comedy Co., was chatting with his current headliners Josh Weinstein and Chris Bliss last week and joked that flights to Paris must be quite affordable right now.

The duo tried out the line later that night. At least two people walked out. The comics subsequently cut the bit from their act.

“On nights like that, audiences normally start off uptight,” Lee said. “The reason they are there is to have fun and forget about reality for a while.”

Timing is everything

A fair number of squirm-inducing subjects were broached earlier this month at Minneapolis’ Brit’s Pub, which was making its debut as a safe haven for amateur comedians.

One deadpan participant received the biggest — and most uncomfortable — laughs by openly wishing for his mother’s death.

But the terrorism in France, which had unfolded a little more than 48 hours earlier, was never mentioned. The subject was also ignored at St. Paul’s Joke Joint Comedy Club.

“It doesn’t surprise me,” said Joint co-owner Rachel Wegscheid. “When it’s a school shooting or any sort of incident in which a lot of people have died, it’s hard to put in a lighter context. Even if the joke is funny, people think they aren’t allowed to laugh at it. Audiences feel guilty, especially right after something happens.”

Audiences are more inclined to accept, if not desire, a dose of reality from the privacy of their own homes where a box of tissues is close at hand. It was familiar faces from late-night TV, more than anyone else, that eased us from the aftershock of 9/11 and back into the pop-culture world — a procession led by David Letterman in a seemingly unscripted love letter to New York that will forever be considered his finest moment.

“The late-night hosts get more leeway,” Wegscheid said. “In a comedy club, you may be seeing someone for the first time and you’re not able to trust them with delicate information. They haven’t built the same rapport as the guys you see five times a week.”

Delicate balancing act

Rich Miller, who books clubs across the country from his home base in Minnesota, said great comics find a way to simultaneously provide social commentary and get laughs. He cites Robert Hawkins, who happens to physically resemble Timothy McVeigh, the extremist convicted in the 1995 bombing of a federal building in Oklahoma City.

“Shortly after that tragedy, Robert would come out on stage with a newspaper and say, ‘I was drunk last night. How drunk was I?’ ” said Miller, who co-owns the Cap City Comedy Club in Austin, Texas. “But if you’re going to address something like that, you better bring it or you’re going to put yourself in a hole. This is an art form.”

Even seasoned performers can be accused of going too far.

Bill Maher eventually lost his ABC late-night program for insisting that the term “cowardly” more appropriately described American forces launching cruise missiles from vast distances rather than 9/11 terrorists who remained in the planes that hit the twin towers.

The Aflac insurance company fired Gilbert Gottfried as the voice of its duck mascot in 2011 after the abrasive comedian posted jokes on his Twitter account based on the earthquake and tsunami in Japan. Former “Saturday Night Live” anchor Dennis Miller lost a significant chunk of his SNL following when the events of 9/11 inspired him to bring a neoconservative slant to his appearances.

“He lost a lot of work because of that,” said Rich Miller, who is his brother.

With that kind of backdrop, it’s no wonder that Baril eventually decided not to include the ISIS bit in his weekend monologues.

“Maybe if I had been performing there more in the past, I could have afforded to do edgier material,” said Baril who did get laughs at the Skyline Comedy Cafe in Appleton, Wis., with a milder routine on Al Shabaab’s nine-month-old threat to blow up the Mall of America. “For now, I stuck with my stronger material that was less likely to ruffle feathers.”