Once upon a time, Bernie Sanders would have had another political vulnerability besides his socialism — namely, his atheism.

In 2016, a Democratic National Committee staffer had to apologize after the WikiLeaks hack exposed an email he wrote that suggested using Bernie’s atheism against him in the primary.

This year, Bernie’s religion — or lack of it — has barely made a ripple or even occasioned any comment. It used to be expected that serious presidential candidates would have religious faith and discuss it, in keeping with the religious coloration of the country they sought to govern. Just as the taboo against openly socialist candidates has given way, so has the old norm about religiosity eroded nearly to the vanishing point.

Sanders, a secular Jew, doesn’t call himself an atheist. The way he puts it is that he isn’t “actively ­involved in organized religion,” and that he believes in God, just not in a traditional matter. “To me,” he has said of his religion, “it means that all of us are connected, all of life is connected and that we are all tied together.”

Asked by Jimmy Kimmel whether he believes in God, he said, “I am what I am. And what I believe in, and what my spirituality is about, is that we’re all in this together.”

Functionally, this means his religion is indistinguishable from the vision of solidarity undergirding his socialist politics.

Indeed, the connection to Israel that Sanders touts to prove that he isn’t anti-Israel had much more to do with a political commitment than a religious one.

He lived for a time on a kibbutz in 1963 as a guest of a secular, socialist youth movement. According to the New York Times, the kibbutz “saw the Soviet Union as a model and often flew the red flag at outdoor events.” Sanders told a publication called Jewish Currents that “it was there that I saw and ­experienced for myself many of the progressive values upon which ­Israel was founded.”

His brother said of Bernie in a 2016 Washington Post interview that “he is quite substantially not religious.”

This makes Sanders an outlier in American life, but less of one than he used to be. According to the Pew Research Center, 26 percent of Americans says they are atheist, agnostic or “nothing in particular,” up from 17 percent in 2009. The growth of the religiously unaffiliated can be seen across all demographic groups and regions but is especially pronounced among young people who are, of course, disproportionately Bernie supporters.

Only 35 percent of millennials attend religious services weekly or once or twice a month, while 64 percent attend a few times a year, seldom or never.

The nonreligious are Bernie’s base. A Pew survey in January found that Joe Biden’s most supportive religious group was black Protestants at 44 percent followed by white Catholics and white evangelicals at 37 percent each. Bernie’s best groups were agnostics (36 percent), atheists (30) and the unaffiliated (28).

In New Hampshire, Sanders lost to Amy Klobuchar and Pete Buttigieg among voters who attend religious services once a week or more and won among voters who never attend. Bernie didn’t have many bright spots in South Carolina, except beating Biden soundly among voters who never attend church, 36-24 percent.

There is no rule that occupants of the White House have to be believers, or Thomas Jefferson never would have been president. But presidential religiosity has advantages. Bill Clinton used it to signal to otherwise politically hostile parts of the country that he understood their values. It fortified George W. Bush under incredible pressure during the war on terror. Barack Obama tapped the rhetorical power of church oratory.

The Sanders phenomenon is another indication of the weakening of American exceptionalism. When the social scientist Seymour Martin Lipset wrote about American exceptionalism decades ago, he underlined religiosity and resistance to socialism. If he captures the Democratic nomination, Bernie Sanders will test how much either still matters or applies.

Twitter: @RichLowry