Any deed of trust that names any person other than a public trustee as trustee therein or that secures an obligation other than an evidence of debt shall be deemed and taken to be a mortgage for all purposes and foreclosed only as mortgages are foreclosed in and through the courts; except that any deed of trust that names a public trustee as trustee therein and secures an obligation other than an instrument evidencing a debt shall be released as provided in section 38-39-102 (5).