In placing a child under the guardianship or legal custody of an individual or of a private agency or institution, and in granting adoption, the court shall whenever practicable select a person or agency or institution governed by persons of the same religious faith as that of the parents of such child, or in case of a difference in the religious faith of the parents, then of the religious faith of the child, or if the religious faith of the child is not ascertainable, then of the faith of either of the parents.