If a person, who has received public assistance or care, shall die leaving insurance, and the estate of the assured is named as beneficiary, or no beneficiary is named, the social services official shall be entitled to a preferred claim to be paid out of such insurance to the amount of the cost of such assistance and care, and for funeral expenses not to exceed two hundred fifty dollars. If the insured leaves a surviving spouse or children under the age of twenty-one years who are, or are liable to become, public charges, the social services official may, in his discretion, waive his claim to such insurance or any part thereof to which he would otherwise be entitled.
N.Y. Soc. Serv. Law § 105