Verify that a string is a valid integer before we call strtol().