Cache the input value when it is useful

This should be less expensive than unparsing the value later, due to
String's copy-on-write.