Not a huge deal, but I would tend to log the warning here on 258 and throw a checked exception to force the caller to handle the error case. Code looks correct the way it is, but just relies on the caller knowing what to expect in the return and to do special handling for populated returned strings.