(a) If a decedent has mortgaged any real or personal property, or has pledged any personal property, or at the time of his or her death owns an equity of redemption, and he or she has neither devised the property nor provided by will for the redemption thereof, the court may order the personal representative to redeem the property out of assets in his or her hands if the action would be beneficial to the estate and not injurious to creditors.
(b) If redemption would be injurious to the estate or to the creditors, the court may order the personal representative to sell all of the right, title, and interest of the decedent in and to the property.