Moves it closer to where its used, narrowing its visible scope, as well as preventing unnecessary std::string constructor executions in the event invalid data is encountered (the continue branch).