thanks for pointing this. Then how about?
MetaDataIter it = metadata_map_.find(key);
if (it != metadata_map_.end())
  return it->second;
return std::string;