Added "buildValidatedFunc(types, func)" method