refactoring: extracted function validate_revision_argument.
Returning argument when valid.