Centralize path argument validation.