Comparing std::string with NULL is a bad idea, so just check whether its empty.