chore(cli): refactor version option usage

Do the check for the version option in the optimize check function