Refactoring of command line options validation