Former Arkansas Gov. Mike Huckabee perpetuated one of the most pervasive myths about transgender people at a convention earlier this year, suggesting that men can abuse trans-friendly laws for voyeurism in women's bathrooms.

"Now I wish that someone told me that when I was in high school that I could have felt like a woman when it came time to take showers in PE," Huckabee said in a video resurfaced on YouTube over the weekend by World Net Daily, according to a report by BuzzFeed's Megan Apper and Andrew Kaczynski. "I'm pretty sure that I would have found my feminine side and said, 'Coach, I think I'd rather shower with the girls today.'"

Huckabee was partly joking — and he acknowledged the laughs from the crowd when he quipped, "You're laughing because it sounds so ridiculous, doesn't it?"

But he was also taking aim at laws that allow people to use the bathroom that matches their gender identity, trying to mock a very serious part of the LGBT movement in the past few years.

Some states are fighting to keep trans people out of bathrooms that match their gender identity

Over the past year, several states have pushed bills that would prevent trans people — who identify with a gender different from the one designated to them at birth — from using the bathrooms they want.

In Florida, State Rep. Frank Artiles told the Miami Herald that such a bill is necessary to prevent "sexual deviants and sexual predators" from walking into a women's bathroom or shower under the cover of the law. "A man such as myself can walk into the bathroom at LA Fitness while women are taking showers, changing, and simply walk in there," he said. "If I feel like a woman that day, I can be allowed to be in that locker room. I don't know about you, but I find that disturbing."

But there's no evidence legal protections for trans people lead to voyeurism

As Media Matters's Carlos Maza pointed out, experts from 12 states that have protected trans people's rights have thoroughly refuted this talking point. There's not a single reported instance of this kind of voyeurism occurring in states with legal protections for trans people.

In another investigation, Media Matters found that 17 school districts around the country with protections for trans people, which collectively cover more than 600,000 students, had no problems with harassment after implementing their policies.

Why Huckabee's joke matters

The myth behind Huckabee's joke has been constantly pushed by opponents of civil rights protections for trans people over the past few years. The joke, while perhaps funny to Huckabee's audience, plays on a very serious policy point by invoking some conservatives' fears — however unfounded — that sexual predators will take advantage of trans-friendly laws to prey on women. This fear is one of the reasons that it's still legal under state law to discriminate against trans people — whether through employment, housing, or public accommodations — in 31 states.

So while many people might see Huckabee's joke as simply harmless, it's the kind of rhetoric that can have serious implications for trans people.

Watch: Life as a transgender woman