Correctly handle NULL pointers in make_str_result.