Set needNullHandling to false only in case of custom generator and true otherwise