Allow g = undefined in validator