Changed to use defaultValue, if present, for sampleValue