(f) If a custodial parent has been diagnosed as having a terminal condition, as evidenced by a declaration executed by a licensed physician, the court, in its discretion, may appoint the custodial parent and a person nominated by the custodial parent as joint guardians of the person of the minor. However, this appointment shall not be made over the objection of a noncustodial parent without a finding that the noncustodial parent's custody would be detrimental to the minor, as provided in Section 3041 of the Family Code. It is the intent of the Legislature in enacting the amendments to this subdivision adopted during the 1995-96 Regular Session for a parent with a terminal condition to be able to make arrangements for the joint care, custody, and control of his or her minor children so as to minimize the emotional stress of, and disruption for, the minor children whenever the parent is incapacitated or upon the parent's death, and to avoid the need to provide a temporary guardian or place the minor children in foster care, pending appointment of a guardian, as might otherwise be required. "Terminal condition," for purposes of this subdivision, means an incurable and irreversible condition that, without the administration of life-sustaining treatment, will, within reasonable medical judgment, result in death.