Improve command line argument validation.