[lldb] Fix TestDataFormatterLibcxxString broken by D129490

We need to check for the error inside the value object to avoid reading
garbage through invalid (target) pointers.

GitOrigin-RevId: a72306e202eedaed7c1a25caf4565bf5577110ce
1 file changed