Check against NULL before assign to a string

This fixes https://github.com/zsx/r3/issues/13

Decode_UTF_String returns NULL because the data doesn't have a BOM