Ensure a string is returned from iOS getText

In some cases the return value from instruments is not a string. So make sure it is. Fixes #4098
Yeah, I was thinking of that over lunch. I'm going to see if it actually ever can be `null`. Though I guess checking doesn't hurt even if it cannot be.