If either the husband or wife of the owner of a homestead becomes mentally ill, the district court serving the county in which the homestead is situated may make an order, upon application of the owner, or if the owner is deceased, the administrator or executor or legal representative of the owner, and upon due proof of such mental illness, permitting the owner, or if the owner is deceased, the administrator or executor or legal representative of the owner, to sell and convey or mortgage the homestead.
N.D.C.C. § 47-18-22