Because I’ve just finished reading my friend, Ben Shapiro’s excellent new expose, “Primetime Propaganda,” I’m reminded how fortunate I am that during most of the time I was writing for television, I was a Democrat. Otherwise, I probably wouldn’t have had a TV career at all.

As Shapiro points out, TV has grown increasingly liberal over the past 50 years. Although he is only 27 years old, he has been diligent in his historical research. Moreover, because he is young, Jewish and wore his Harvard Law baseball cap when he interviewed the writers, producers and network executives, who have created the product and scheduled the programming over the years, they all assumed he was, like them, a devout leftist.

I suspect that even without the baseball cap, these limousine liberals would have probably assumed that, like everyone else who enters their well-insulated bubble, Shapiro idolized Barack Obama. Why else would they not have bothered checking out his credentials? After all, in spite of being a practicing attorney, Shapiro has written three previous books, all espousing his conservative values, and is a contributor to several right-wing blogs.

Even I, who personally know several of the makers and shakers in the industry, was shocked to read some of the things they had to say about conservatives. You would have thought they were discussing jihadists, except they are generally far more respectful when referring to the people who wish to behead us. It’s only when it comes to writers and actors with whom they have political differences, that they’re united in their desire to see them blacklisted or, better yet, dead.

The irony of course is that these are the same self-righteous characters who have carried on incessantly about the inequity of the industry’s having blacklisted Communists 60 years ago. Hypocrisy aside, there is a world of difference that is apparent to most normal, fair-minded people, between a conservative opposing ObamaCare and a Communist tithing 10% of his MGM salary to the Soviet Union, where Joseph Stalin was starving millions of Russians to death and assassinating his political rivals. Even the fact that Stalin had his boot on the neck of hundreds of millions of people who had the misfortune of living in Poland, Hungary, Czechoslovakia and East Germany, was of no concern to the Hollywood lefties. It should be noted that these were the same folks who made Siberia, the hellish place to which Stalin exiled Jews and other nuisances, the tagline to a thousand benign jokes in a way they’d have never dared with Auschwitz or Buchenwald.

I was indeed fortunate that, thanks to having been born into a Russian-Jewish home, I was raised to believe the sun rose and set on FDR. Once something is virtually ingrained in your DNA, it’s hard to break free. In my case, it was the combination and contrast of Jimmy Carter and Ronald Reagan that ultimately did the trick. But in terms of my career, it’s lucky that I didn’t come to my senses any sooner than I did.

Even though the TV movies I wrote weren’t political, it probably wouldn’t have saved me from being ostracized. After reading “Primetime Propaganda” and discovering how very much Gene Reynolds, Allan Burns, Leonard Stern, Grant Tinker, Gary David Goldberg, James Brooks and Larry Gelbart, despised conservatives, I have to assume that I would never have had the opportunity to write episodes of “McMillan & Wife,” “MASH,” “Mary Tyler Moore,” “Family Ties,” “Rhoda,” “The Governor & J.J.” or “Bob Newhart.”

Oddly enough, I broke in during the late 60s, writing a bunch of “Dragnet” scripts for Jack Webb. The fact is I didn’t have to conceal my true feelings in order to write for the show that Shapiro ranks as the fifth most conservative series of all time. Even back then, I was pro-cops and pro-military. Somehow, in spite of my upbringing, I managed to be a registered Democrat without being a complete bonehead.

I now recall that a few minutes after my first “Dragnet” episode aired, an acquaintance, writer Harlan Ellison, phoned me. In lieu of “Hello,” he snarled, “I never knew you were a fascist!” Then, in typical left-wing fashion, he hung up. It’s very possible that was when my politics began evolving. It is, after all, a prime example of the sort of fair and open-minded discourse I’ve come to expect from liberals.

Although Shapiro quotes me a few times (pages 69, 77 and 244, for those discerning readers too cheap to spring for the book), he left out — perhaps because I forgot to mention it — the one time I encountered political blowback during my TV writing career.

In 1990, I foolishly turned 50. I say “foolishly” because if there’s one thing TV hates more than conservative writers, it’s aging ones. Liberals oppose bigotry and discrimination unless, of course, they’re the ones doing the discriminating.

My mood over the next several years ranged from bleak to suicidal as unemployment led inevitably to the sale of our condo, the cashing in of my life insurance and, finally, to bankruptcy. In 1999, though, through dumb luck and a series of quirky circumstances, I landed a spot on the writing staff of the Dick Van Dyke series, “Diagnosis Murder.”

The rest of the writing staff consisted of three male, left-wing, middle-aged yuppies. The producer had hired them back in June. By December, they decided they were working too hard and insisted that another writer be brought on board. What they didn’t know was that they were inviting a viper into their midst.

When they discovered that I was not only a Republican, but that I despised Bill Clinton and had every intention of doing whatever I could to keep Al Gore from succeeding him, they made me feel about as welcome as heat rash.

To be fairer to them than they were to me, their attacks consisted mainly of witless jibes and juvenile ridicule, mainly questioning the intelligence of anyone who would even consider voting for a conservative. For a while, it saddens me to admit, I took it because I really needed the paycheck.

Then one day, as if a huge light had been switched on, it occurred to me that they needed me. I worked harder and longer hours and, what’s more, wrote better than they did. That morning, taking the bit in my teeth, I interrupted their sophomoric prattle long enough to announce that the good times were over, and that they would have to either find a new target or grow up.

I explained as patiently as I could that I wasn’t opposed to bi-lingual education because I was a bigot, but because it holds Latino kids back academically and makes them hate school so much that they can’t wait to drop out. Which, as we all know, they do in record numbers.

I told the three brats that if I was in favor of capital punishment, it wasn’t because I was bloodthirsty — or at least not just because I was bloodthirsty — but because, as a conservative, I naturally empathize with the victim, not the murderer.

Furthermore, I went on, throwing down the gauntlet, if any or all of them wished to debate any issue under the sun, I’d be more than happy to oblige. Nobody accepted the challenge, but from that day on, the not-so-good-natured ribbing came to an end.

By the time the 2000 presidential election rolled around, we were all getting along just fine. They even gave me a pass when Bush defeated Gore. After all, by then they knew I was a lost cause. Instead, like sharks smelling blood in the water, two of them turned on the third. It seems the lunkhead made the fatal mistake of confessing that he’d voted for Ralph Nader.

I recall wondering at the time how he could have been so dumb as to admit he’d deserted Gore in his time of need. But no sooner was I trying to solve that mystery than a little voice in my head that sounded a lot like Jackie Mason was screaming: “How could he have been so dumb? Schmuck, he’s a liberal!”