SALT LAKE CITY (AP) — A former Disney Channel actor charged with trying to have sex with a 13-year-old boy in Salt Lake City contends he can’t get a fair trial because the judge handling his case is biased against gay people.

An attorney for actor Stoney Westmoreland said in court documents filed last month that U.S. District Judge Howard Nielson Jr. is incapable of being impartial because he represented proponents of a gay marriage ban in California when he was a private attorney, the Deseret News reports . Nielson argued then that being gay is a choice and people can become heterosexual via conversion therapy, defense attorney Wendy Lewis wrote in court documents.

ADVERTISEMENT

Judge Nielson refuted the notion and denied Westmoreland’s request for him to recuse himself from the case. He said views of his clients don’t represent his own opinions.

“I can state categorically and unequivocally that I do not harbor any personal bias or prejudice concerning Mr. Westmoreland,” Nielson wrote in his order denying the motion earlier this month.

Westmoreland was fired from his grandfather role on the made-in-Utah Disney Channel series “Andi Mack” after his December arrest.

Police say Westmoreland, 49, communicated with an undercover officer on the app Grindr and was arrested after trying to meet the investigator posing as a teenager.

Westmoreland has pleaded not guilty to enticement of a minor.

The actor is bisexual and his lifestyle will be discussed at the upcoming trial, with witnesses who are gay men expected to discuss Westmoreland’s transition from being in a heterosexual marriage to coming out as gay, Lewis wrote.

The attorney mentioned opposition earlier this year by 59 Democratic members of Congress who said in a letter that Nielson shouldn’t be appointed because he is biased against LGBTQ people. He earned the appointment based on backing by Republicans including Sens. Mitt Romney and Mike Lee of Utah.