Is this ``data`` necessary? If you use std::string, you could just check for emptiness.