There is a scene in the first episode of new BBC drama series Informer that’s particularly refreshing for anyone sick of Muslim stereotypes on TV. The show’s protagonist, Raza Shar (Nabhaan Rizwan), is being interviewed by a hipster photographer for a flatshare when he notices something weird in a proudly displayed photograph of an east London council estate. On the left is an Asian kid smoking, and on the right a kufi-wearing Muslim man handing out leaflets. In disbelief, he notices that the kid smoking is him (“That’s me on a break!” he says). But why, he asks, is the photograph titled Young Radicals? “I called it Young Radicals because of the radicalising leaflets the man on the right is distributing,” explains the hipster. “That’s Tariq,” says Raza. “He’s handing out menus.” Rizwan believes the scene subverts the white media gaze that pigeonholes Muslims as terrorists – a gaze he’s experienced more than his fair share of in his life. “A lot of people are going to connect with that because they’re tired of the lazy stereotypes of Muslims,” he says.

Playing Raza is a superb TV debut for 21-year-old Rizwan, but it is also quite a responsibility to star in a drama that counters such anti-Islamic prejudices. “Growing up when I watched TV I never thought: ‘There’s a Muslim, I really identify with them.’”

This is because, until now, there have been few characters for someone like Rizwan to identify with. Take the jihadist baddies of US thrillers such as Homeland or 24, or the buffoonery of Asian life in Birmingham-set sitcom Citizen Khan. “For a long time, the Asian community have been the butt of their own jokes,” Rizwan says of Citizen Khan. “It’s like: ‘Oh there’s some Asian people, they speak funny and eat funny food.’ I feel like the Asian community were somewhat accepting of that. At least it’s representation. I understand that attitude but it’s damaging. It’s time for the conversation to move on.”

So how can the TV industry improve? One way of regulating these stereotypes is through dramas passing the Riz test – a system that the actor Riz Ahmed set out in a House of Commons speech last year. It’s similar to the Bechdel test (which requires that a film features at least two women who talk to each other about something other than a man) in that not many things pass it. If the film or show stars at least one character who is identifiably Muslim (by ethnicity, language or clothing), is the character: 1) Talking about, the victim of, or the perpetrator of Islamist terrorism? 2) Presented as irrationally angry? 3) Presented as superstitious, culturally backwards or anti-modern? 4) Presented as a threat to a western way of life? 5) If the character is male, is he presented as misogynistic?; or if female, is she presented as oppressed by her male counterparts?

If the answer for any of the above is “yes”, then the film/TV show fails the test.

Riz Ahmed and Kayvan Novak in Four Lions. Photograph: Everett/Rex

It is likely, however, that Four Lions, Chris Morris’s scabrous 2010 satire on witless Brit jihadists – in which Ahmed starred as a Sheffield suicide bomber planning to detonate himself at a charity fun run – would fail on at least points one to four. But there are very few creations featuring Muslim characters that would pass the test.

Consider Fox’s 24: Legacy. It’s story of a stereotypically capable cadre of foreign jihadis slaughtering US citizens; a plot that gave support to Trump’s Muslim travel ban, ignoring – as the president did – the truth that recent fatal terror attacks in the US and Europe have been perpetrated overwhelmingly by local individuals acting without help from an external group. The New York Times called it a “one-hour Super Bowl ad for Islamophobia”.

Or Britain’s biggest TV drama in a decade, Bodyguard, which started with Anjli Mohindra playing a hijab-wearing woman hiding in the toilet of a train who’s about to detonate a bomb-packed vest. Her narrative, from victim rescued by Richard Madden’s eponymous hero to jihadist (by the end of the series), seemed like a massive Riz Test fail. The show’s writer, Jed Mercurio, rejected claims of Islamophobia, telling the Radio Times that “if the show were set in the recent British past, the attackers might be Irish republicans”. Of course, he forgets to consider that when levels of anti-Muslim hate crime are soaring, TV could do with more narratives that bring a better understanding of Muslims, as journalist Tasnim Nazeer recently stated. “What would it take for a film-maker to consult diverse writers … and change the narrative?” she asked in the Guardian. Alternatively, we could have white people doing “brown face” to learn what it’s like to be a Muslim in Britain, as on Channel 4’s My Week As a Muslim last year. Or, you know, not.

Ramzi Kassem, law professor at the City University of New York says that those working in mainstream cultural production “need to know that the discourse they shape actually carries real-world consequences”. He was hired as a consultant for Homeland’s sixth season in 2017 after Showtime’s spy thriller series became such a byword for Islamophobia that three graffiti artists, who were enlisted to spray a fictional Syrian refugee camp while the show was being filmed, wrote messages such as “Homeland is racist” in Arabic, which went unnoticed by producers. His input changed the show’s bias: at one point, CIA agent Carrie Mathison (Claire Danes) yells at an FBI agent that their client was “just another Muslim kid you entrapped” by using an informant who posed as a friend. It was a scene scarcely conceivable in previous seasons. “I felt I had a social responsibility to try to do what I could to make the show more realistic,” Kassem told Public Radio International, “to make it less negative in its portrayal of Muslims and more critical in its portrayal of the government’s role in counterterrorism.”

Himesh Patel with Maddy Hill in EastEnders. Photograph: Kieron McCarron/BBC

Meanwhile, John Krasinski, the star of Amazon’s series Jack Ryan, recently argued that – despite the main plot of terrorism – the show steers clear from the “archetypal, moustache-twirling terrorist representation” of Muslims through a complex depiction of the main terrorist’s family. Although, even in the absence of moustache twirling, the series fails the Riz test on many points. The family dynamic of a wife alienated from her psychopathic jihadi husband and protected by a white American hero is hardly breakthrough material. In short, if you want to find TV that passes the Riz test, don’t follow the money.

So, does Informer move the conversation on? Rizwan thinks so. “Raza lives a regular life and has a menial job. It’s quite accurate,” he says. “It’s not the stereotypical Muslim family you normally see on telly: his dad drinks and his mum doesn’t wear a headscarf, plus she’s the breadwinner of the family. Growing up in Ilford, lots of my friends who were Muslim had families where the mum was the breadwinner.”

In this more realistic depiction, Informer nods to what Barack Obama recently said about stereotypical Islamic portrayals in the media. “Our television shows should have some Muslim characters that are unrelated to national security,” he told the Islamic Society of Baltimore.

Obama doesn’t watch EastEnders, but perhaps he should. A scene in the British soap from three years ago was gently subversive: just after the terrorist mass murders in Paris, the character of Tamwar Masood (Himesh Patel) explained his religion to girlfriend Nancy Carter (Maddy Hill) after she asked him what an Arabic passage he had marked in the Qur’an meant (“Do good to near of kin, the neighbour who’s a stranger, to the companion at your side, and to the traveller”).

“That to me is what Islam is about,” Tamwar said. “Be kind to people, family and strangers alike, and love them.”

It was a new perspective and storyline previously untold by soaps or dramas, and the product of research into real Muslim lives. According to Rizwan, this is severely absent from most shows and films. “The point is that there are more interesting south Asian stories than we usually get in the media,” he says. “If you’re not from that part of the world or don’t have family from there, it’s easy to fall back into writing stereotypes. The worst thing about that is that what the viewers see they take as gospel. It’s time for something more nuanced.”

Informer starts Tuesday 16 October at 9pm, BBC1