Except as otherwise provided by law or by order or judgment of a court of competent jurisdiction or by testamentary disposition, no surrender of the custody of a child shall be valid in this State unless made to an approved agency pursuant to the provisions of this act or pursuant to the provisions of a substantially similar law of another State or territory of the United States or of the Dominion of Canada or of one of its provinces.
N.J.S. § 9:2-14