fix crash due to construct std::string with NULL