"You take the idea that a lawyer should be anonymous.
Television killed that dead!
Fellows like Perry Mason murdered it."
Ben Franklin Bristow
'The Name Of The Game'
This quote is perfect for splainin away why TV lawyers, especially Perry Mason, can be familiar to characters in other TV shows - because they have seen them on TV during the news, during TV specials about really notorious cases, perhaps even on talk shows.
And this is why it would never be a Zonk if a TV character mentions lawyers like Perry Mason. It wouldn't even be a Zonk if they inferred that they saw them on TV.