Restored functionality to detect std::string(0) calls as null pointer dereferences (#6189)