Yes, in the past I have written a few articles critical of Bill Maher’s overgeneralizations about Muslims. OK, I have written many articles. I even recently criticized Maher for arguing that profiling Muslim Americans like Ahmed Mohamed, the 14-year-old Texas teen arrested for building a homemade clock, was appropriate because some Muslims in the past had committed bad acts.

But now I have to praise Maher for helping out a Muslim. You see, last year when Hasan Minhaj, then a stand-up comic who was scraping by, was auditioning to be a correspondent on The Daily Show, Maher played an instrumental role in helping Minhaj secure that job.

As Minhaj explained to me Saturday on my SiriusXM radio show, last fall he was invited by The Daily Show’s producers to submit an audition tape. So Minhaj put together his best Daily Show-type segment and excitedly submitted it in the hopes of impressing the show’s producers. Well, the good news was the producers were impressed. But then the producers wanted more. They asked him to fly to New York City to do an entirely new bit for Jon Stewart on the set of the show.

As Minhaj joked, “An entirely new segment?! I was like, ‘Damn it!’ I’m not Larry David, I don’t have a Curb Your Enthusiasm and a Seinfeld in me.”

Minhaj was at a loss for what to prepare for Stewart that might win him the highly coveted gig as a correspondent. That’s where Maher swooped in to save the day. As Minhaj was pulling out his hair trying to come up with an idea, Maher got into his infamous yelling match with Ben Affleck about Muslims. It’s the one where Affleck called Maher and his buddy Sam Harris (the “Islam is the motherlode of bad ideas” dude) “racist” for their grotesquely broad generalizations about Muslims.

And boom, an idea was born. As Minhaj quipped, “Islamophobes are thankfully right on time when you need them… they are like the gift that keeps on giving” for Muslim comedians.

Based on that heated exchange, Minhaj came up with a segment he called “Batman versus Bill Maher.” Next thing you know, Minhaj is in New York City on The Daily Show set awaiting Stewart’s arrival. Nervous? Yes. But still hopeful, thanks to the “help” of Maher.

So off Minhaj went into his desk piece about Batman fighting Maher. “Affleck might not be the hero the Muslim world wants, but he’s the hero we need,” joked Minhaj, adding, “I was so happy with Affleck defending Muslims that I forgave him for ‘Gigli.’”

After Minhaj performed the bit for Stewart, the late night host offered him a polite “thank you.” Minhaj then sheepishly gathered up his things and started heading for the door. But right before he stepped out of the studio and back into reality, Stewart called out to him: “See you Monday, right?” Yes, Minhaj had been hired to be a correspondent on The Daily Show! In fact, Minhaj was the last correspondent hired by Stewart before he departed the show.

Minhaj, who this week is celebrating his one-year anniversary with the show, spoke glowingly about Stewart. He described his former boss as a “comedy Jedi who could walk on water” and as a person who played a tremendous role in his career and life. Minhaj explained that Stewart would encourage him to talk about issues, especially those involving Muslims, in an open and honest way that expressed his own voice.

While Minhaj clearly misses Stewart, he’s confident that new host Trevor Noah will prove to be hugely successful. “Trevor has an international perspective, can speak five languages, and has performed to crowds around the world, winning them over with his insightful and hilarious comedic observations,” Minhaj explained. “I can’t wait for the show’s audience to get used to Trevor and what he can do.”

Minhaj, not content to just work full time on The Daily Show and perform stand-up comedy in the clubs of New York City, is about to star in his own Off-Broadway one-man show, Homecoming King, that will open on October 23. The show tells the story of the trials and triumphs of Minhaj and his family immigrating to the United States from India in search of the “American Dream.”

“The American Dream is so elusive—it means different things to different people,” Minhaj explained. “For some, it’s getting a job or a degree from a great school, while for others it’s moving to the suburbs and getting a Ford Explorer. The show is so much about my family’s pursuit of our own American Dream,” he added.

Minhaj made a great point that the closer you are to the immigrant experience, the more likely it is that you believe “America is great right now.” Minhaj chalked up the concerns some have about the American Dream being dead and America no longer being great emanating from the looming minority status for white Americans.

“The new ‘Brown America’ is happening, but I don’t think it’s a bad thing. In fact, I think it’s great that there are a whole bunch of Drakes out there, people of mixed race and multilingual,” Minhaj noted. Adding, “Donald Trump doesn’t see it that way but I see it as being great for America.” I couldn’t agree more with Minhaj.

So there you have it. Thanks to Bill Maher’s anti-Muslim diatribe, Minhaj got a gig on The Daily Show and is about to star Off-Broadway in his own one-man show. Maybe we should send Maher a thank you gift? I’m thinking a special homemade clock built by Ahmed Mohamed.