I like Megyn Kelly. The Fox News anchor is smart, lively and gorgeous. But she’s managed to walk right into a controversy over race and ethnicity, and it’s not the first time. These are treacherous waters for anyone in media — but especially so for media personalities who are perceived as conservative. (Full disclosure: I am also a Fox News commentator.)

This brouhaha involves Kelly’s decision on Wednesday during her show not to name the shooter in the deadly attack at Ft. Hood. Here’s what she said: “Authorities are identifying the shooter. If you are interested, you can get his name on other shows, like the one that preceded this one, and online, but we have decided not to name these mass killers as a policy here on ‘The Kelly File.’ ”

So far, so good. Her decision seems motivated by a desire not to give mass killers the notoriety many of them desire. In this particular case, she may be off target — the shooter was a soldier being treated for mental-health issues — but the principle is unobjectionable.

If Kelly had left it there, the controversy would be solely about whether naming mass killers is good or bad policy. Unfortunately, later in her show, she decided to comment on the shooter’s ethnicity. “The nationality of the shooter, it sounds Hispanic, Latino, but you can look up his name online,” she said.

Now, I have no problem with identifying race when it is relevant. If a suspect in a shooting is on the loose, it seems eminently sensible to describe what he or she looks like, including skin color. But in this case, Kelly’s use of the shooter’s ethnicity was superfluous. He’d already killed himself, as well as three others.

The problem for Kelly is compounded by an earlier controversy over her assertion that both Santa Claus and Jesus were white men. She’s right, depending on how you define “white.” St. Nicholas, after whom Santa Claus is modeled, was a 3rd-century bishop from a town that is now part of Turkey but was Greek at the time. Jesus of Nazareth was a Jew living in what is now Israel and likely looked more like El Greco’s depiction of a dark-haired, dark-skinned Semite than Holbein’s fair-haired Northern European.

To be fair, Kelly’s comment on Santa and Jesus was in response to an article in Slate that argued for Santa to be turned into a penguin. The author, Aisha Harris, argued that in today’s increasingly multiracial, multiethnic America, we should get rid of “Santa-as-fat-old-white-man,” a sentiment that clearly struck Kelly as offensive.

She would’ve been better off at the time making the point that race is irrelevant — or should be — to both figures. And it is clearly irrelevant to the Ft. Hood shooting. Conservatives have to be especially careful in this regard.

I don’t know what was going through Kelly’s mind when she decided to raise the ethnicity issue — but if she’d thought it through, I doubt the words would have come out of her mouth, which is one of the great dangers with live TV.

One of the best ways I know to stop from uttering something that is likely to sound prejudiced is to imagine the words coming from someone who doesn’t share your ethnicity — even better, someone whose views you usually don’t agree with — and substituting your own ethnic or racial group for the one being talked about.

If Al Sharpton had said he wasn’t going to name the shooter but the name sounded white, you can bet Kelly would’ve jumped all over the comment.

The Fort Hood shooting was tragic. It doesn’t appear from early reports that the shooter, Ivan Lopez, was motivated by anything other than mental illness. He served a short tour in Iraq and returned home depressed and anxious, for which he was prescribed several medications. His superiors regarded him as an exemplary soldier; he was married and a father of four.

Because he took his own life, we’ll probably never know why he turned from a good soldier into a murderer. But one thing we can say for sure: The fact that he was Puerto Rican had nothing to do with it.