More careful catch of the lexical_cast throw