Use std::string::empty() instead of size() where applicable