SALT LAKE CITY — A Republican Utah senator has proposed a process for transgender people to legally change their gender through the courts.

Todd Weiler’s legislation comes as the Utah Supreme Court is weighing the case of two transgender residents who have appealed after state judges refused to grand their gender change petitions.

Weiler said Utah has a vague law that allows people to legally change their name and sex, but it wasn’t indented to be used for petitions from transgender people.

Because the law is vague and doesn’t make it clear that the gender changes are allows, some judges are granting petitions and others are denying them, Weiler said Thursday.

His bill says a person can file a petition to change their gender with their local court if they’ve lived in their county for at least one year, they’re not involved in any other legal proceedings or on probation or parole and are not requesting the change to avoid creditors.

The proposal does not require someone to have taken specific steps in order to be granted the change, such as having a sex-change surgery or hormone therapy, The Salt Lake Tribune reported . Instead, it says a judge can approve the change if someone can show there’s a reason for it.

Troy Williams, the executive-director of LGBTQ-rights group Equality Utah, told the Deseret News that the bill “will provide dignity and respect to transgender Utahns.”

Weiler said his law, if passed by legislators before they adjourn mid-March, would not be retroactive and would therefore not affect the case pending before the Utah Supreme Court.

In 2016, Second District Judge Noel Hyde denied requests from transgender residents Angie Rice and Sean Childers-Gray to legally change their genders but approved their requests to change their names.

Hyde said the law precluded him from approving the gender switch.

Rice and Childers-Gray, who both have driver’s licenses and insurance cards that list their new names but the sex designations they no longer identify with, argued before the court last month that the law allows for a gender change and said there’s a need for their personal records to match their identity and reality.

The justices have not yet issued a decision.