It was one of the biggest television showdowns of the year: Ben Affleck vs. Bill Maher in a debate over Islam. The left-leaning Hollywood personalities got into a yelling match on Oct. 3. Maher called Islam “the only religion that acts like the mafia, that will [expletive] kill you if you say the wrong thing, draw the wrong picture or write the wrong book.” Affleck responded angrily that Maher’s rhetoric was “gross, racist and disgusting.”

The argument was a microcosm of Hollywood’s larger challenge in portraying Islam, Muslims and the Middle East: How sensitive is too sensitive? How real is too real? And when does portraying Muslim extremists become stereotyping?

Islamic terrorists have been featured in TV shows including “24” and “Homeland” and in the film “Syriana,” and the lives of Muslims have been explored on the big screen in “The Kite Runner,” Three Kings,” “Kingdom of Heaven” and many other films. But some say Hollywood has been playing it far too safe in its portrayals.

“You have to expose the radical ideology. Hollywood could play a big part in that but they won’t ever do it,” said L.A.-based Director of Former Muslims United and author Nonie Darwish, who was born in Egypt but converted to Christianity after moving to the United States. “I don’t want to watch the denial of what really goes on. Hollywood has a blackout from reality. They don’t know how to portray the reality without offending, so instead they rarely portray the reality.”

Earlier this year, following a campaign by the Council on American-Islamic Relations (CAIR) over concerns the show would perpetuate negative stereotypes of Arabs, ABC Family canceled the pilot for “Alice in Arabia,” a show about a Muslim-American teen kidnapped in Saudi Arabia. The show’s writer, Brooke Eikmeier -- an Arabic-speaking U.S. Army veteran – said she hoped it would “give Arabs and Muslims a voice on American TV.” During the making of “2012,” director Roland Emmerich considered obliterating the Grand Mosque in Mecca amid the global apocalypse but was advised to destroy the Sistine Chapel in the Vatican and the Christ the Redeemer Statue in Rio de Janeiro instead, citing a “fatwa fear.”

But while critics of Islam condemn Hollywood for not going far enough, others say the industry has a long way to go if it wants to portray them accurately, saying it routinely stereotypes Muslims as bombers, belly dancers and bad billionaires.

“The main problem Hollywood has when telling stories about Muslims is automatically ascribing the violence and sexism committed by some Muslims to the religion of Islam. Religions aren’t inherently violent; some people are,” said Michael Wolfe, co-director of MOSTResource.org, a Muslim resource website dedicated to helping the entertainment community.

“For example,” Wolfe said, “the Ku Klux Klan invokes Christianity in its pursuit of racism, but we don’t confuse the KKK with Christianity. Islam doesn’t get the same treatment.”

The Writers Guild of America has tried to address the topic with advice articles on its website, pointing out that Muslim “culture is rich, fascinating and had much more of a positive impact” than some would have you believe. An article entitled “Writing Islam Right” quips, “If you want to write a convincing Muslim character, spend a little more time fleshing out the ‘character’ and a little less time fixating on the ‘Muslim.’”

A source closely connected to Showtime’s “Homeland” said the show and most Muslim-focused productions hire full-time consultants to ensure accuracy, making certain that actors know how to “correctly treat a Koran” and the correct process for praying. They also work with the writers to make sure the cultural aspect of their work is handled appropriately.

“Producers and studios very much understand the sensitivity of the subject matter and the sensitivity to criticism,” the insider said. “But that won’t stop them from telling stories about characters, and putting them into geopolitical binds. The goal here is to heighten the realism.”

Shaun Toub, a Jewish-Iranian-American actor who plays Iranian Deputy Intelligence Chief and bombing mastermind Majid Javadi On “Homeland,” acknowledges that he has worked hard not to be stereotyped as the “terrorist actor,” but says he doesn’t mind playing a bad guy if there is a reason for it.

“I was concerned about ‘Homeland’ at first,” he said. “I wanted to make sure the character had dimensions, and he did.

“I like to look at (my ethnic background) as an advantage. Just like being a blond, blue-eyed American has advantages for roles in Hollywood, so, too, does being from the Middle East.”

The Hollywood bureau of the Muslim Public Affairs Council (MPAC) works with industry leaders in an effort to advance perspectives and serve as an “information clearinghouse.” The Noor Iranian Film Festival was held in Los Angeles last month to tries to cultivate and promote Iranian-American talent as well as shed a light on Iranian culture and life.

But as Toub points out, show business has a responsibility to create works that entertain, educate and, above all, encourage deeper thinking.

“I just want to do films that create conversation,” he said, “however that might be.”

 Follow @holliesmckay on Twitter