The librarian at the (fictional) Texas high school in the hit CBS sitcom “Young Sheldon” is a Mormon.

How do we know this? Because the librarian’s religion became a minor plot point in a first-season episode.

Sheldon Cooper (Iain Armitage) — a boy genius lacking in social skills — does not believe in God. That’s true of the adult version of the character viewers have seen since 2007 in "The Big Bang Theory”; it’s also true of the 10-year-old version who’s at the center of the hit spinoff, which debuted a year ago.

Sheldon’s mother, Mary (Zoe Perry), on the other hand, is a true Bible-thumping believer — a regular churchgoer who drags her family along with her.

“There’s this constant kind of give-and-take," Perry said, “about what to do when it comes to parenting children who don’t necessarily share her beliefs when it comes to faith.”

In an episode titled “Demons, Sunday School, and Prime Numbers,” the ever-analytical Sheldon researches religions. When librarian Ms. Hutchins (Sarah Baker) tells him she’s a Mormon, Sheldon asks her to explain.

(The show is set in 1989-90, back when it truly was OK for members of The Church of Jesus Christ of Latter-day Saints to call themselves “Mormons.”)

“Well, it started in New York when a man found gold plates buried underground,” Hutchins said. “The plates said that when we die, we get to go to our own planet. Unless you’re a woman. Then you have to go to your husband’s planet.

“But that won’t be a problem for me. I don’t have a husband. All I have is a cat. A big, mean cat. Maybe I’ll get to go to his planet. Lonely Cheryl on Planet Cat.”

It’s a funny moment in a funny episode of a funny series. And no offense was intended to any Latter-day Saints.

“No matter what viewpoint on the religion aspect we were talking about, we did our best to, even in comedy, stay as truthful as we could,” said creator/executive producer Steve Molaro, “and try not to make anybody’s viewpoint the butt of a joke.”

But make no mistake, it's supposed to be funny.

“It’s still a comedy," Molaro said, “and hopefully people can have a little bit of a sense of humor.”

Theologically, Ms. Hutchins’ comments about there being golden plates were accurate (church founder Joseph Smith reported translating them to bring about the faith’s signature scripture, the Book of Mormon).

But her comments about the planets seemed like they came out of the "Book of Mormon” musical. The Utah-based faith has explained that such notions about planets are more of a “cartoonish” treatment of its doctrine of human potential in the afterlife.

Molaro confirmed that there are no Latter-day Saints in the “Young Sheldon” writing room.

(Photo: Michael Desmond/Warner Bros.) Tam (Ryan Phuong) and Sheldon (Iain Armitage) eat lunch together in the school library on “Young Sheldon.”

The Mormon moment in the episode comes on the heels of Sheldon’s teenage friend Tam (Ryan Phuong) explaining whom you pray to if you’re a Catholic.

“I guess … Jesus, God and Mary,” Tam says.

“Jesus isn't God?” Sheldon asks.

“No. He’s his son,” Tam replies. “But you do eat him, and drink his blood. Oh, there’s also a ghost — but not the scary kind.”

He goes on to talk about the pope and his “special car” and “big, pointy hat,” and he explains that “every once in a while, you have to confess your sins to a priest.”

“Not me. I don't have any sins,” Sheldon says.

“Then you have the sin of pride,” Tam replies.

“Your religion is making me feel bad,” says Sheldon.

“That’s how you know it’s working,” Tam says.

Creator/executive producer Chuck Lorre (“Two and a Half Men,” “Mom,” “Mike & Molly,” “Dharma & Greg,” “Roseanne”) said that while religion has always been a point of contention between Sheldon and Mary (played by Perry’s real-life mother, Laurie Metcalf, on “Big Bang”), the writers “were very clear that we wanted to be respectful, and we didn’t want [to be taking] a cheap shot.”

(Photo courtesy of Monty Brinton/Warner Bros. Entertainment) Laurie Metcalf as Mary Cooper and Jim Parsons as Sheldon Cooper in "The Big Bang Theory."

Sheldon the atheist does not always get the best of Mary the believer on either “Big Bang” or “Young Sheldon.” Mary is written as a loving mother who supports her unusual son and is willing to fight for him — including when it comes to religion.

“Would you be angry with me if I don't pick your religion?” Sheldon asks her.

“I could never be angry with you,” Mary replies. “You be a seeker of your own truth. … And if the truth turns out to be Satan, I will do battle with him.”