(a) The sale of land of infants or individuals with mental illness shall not be deemed to be prohibited as being in contravention of the deed, will, or contract under which they hold unless a sale is expressly forbidden by the deed, will, or contract.
(b) When the legal title of land is held by a trustee, he or she shall be a party to the proceedings for its sale. In all other respects the proceedings for the sale of land held in trust for infants and individuals with mental illness shall be the same as when they hold the legal title, except that the trustees shall give bond and security instead of the guardian when the proceeds of sale are to go into the hands of the trustee.