"The Daily Show" host Trevor Noah criticized "gender reveal parties" earlier this week, arguing they should only happen when the child is "old enough to know their actual gender."

"Celebrating a baby's genitalia is starting to feel very outdated,"  Noah said on Tuesday's show. "Like, given everything we're learning about gender, gender reveal parties should only happen when the child is old enough to know their actual gender."

Sen. Ted Cruz, R-Texas, responded Friday by mocking Noah's comments on Twitter, writing, "Hollywood is funniest when they don’t intend to be."

CALIFORNIA WILDFIRE SPARKED BY GENDER REVEAL PARTY SPURS CREATOR TO URGE 'STOP HAVING THESE STUPID PARTIES'

Noah's comments touched on an ongoing debate surrounding the biological basis for gender and sex. "Harry Potter" author J.K. Rowling notably came under fire earlier this year for standing by the concept of biological sex.

"If sex isn’t real, there’s no same-sex attraction," Rowling tweeted in June. "If sex isn’t real, the lived reality of women globally is erased. I know and love trans people, but erasing the concept of sex removes the ability of many to meaningfully discuss their lives. It isn’t hate to speak the truth."

In recent months, CNN has promoted the idea that men can have cervices, using the phrase "individuals with a cervix," while the U.K.-based outlet Pink News described the statement "only females get cervical cancer" as a "transphobic lie."

TWITTER USERS MOCK CNN OVER STORY ON CANCER SCREENING FOR 'INDIVIDUALS WITH A CERVIX': 'YOU MEAN WOMEN?'

Liberal groups like the Human Rights Campaign, as well as medical associations, assert that gender is more complicated than Rowling suggested.

“Gender identity and assigned sex at birth can be different one from the other, and that difference needs to be recognized in order to effectively guarantee access to care for transgender people,” read a 2018 letter from dozens of health groups, including the American Psychiatric Association, American Academy of Pediatrics, and Endocrine Society.

CLICK HERE TO GET THE FOX NEWS APP

However, that stance is not universal. The American College of Pediatricians has condemned treatments like puberty blockers for children and called on the surgeon general last summer to investigate those types of treatments.