So here you're not just stylistically dangerous by using `!=` rather than `!==`, you're actually relying on it to do the type coercion for you... again any javascript linter worth its salt won't let you get away with this.  You pretty much never want to use `!=` or `==` in javascript, and nearly always want to use `!==` and `===` because they don't automagically type convert the arguments.

So then you follow up this line with an inlined explicit type conversion without error checking: `parseInt(X)+1`.

You should have something like:
```javascript
args._rev = parseInt(args._rev);
if (isNaN(args._rev)) return callback(new Error("invalid rev");
// you actually should hoist that all the way out and up and do it before even asking for the doc... why get the doc if the user gave you a bogus rev
// ...
if (doc._rev != args._rev) return callback(new Error('conflict' /* really should add more detail about what the conflict is*/));
args._rev = args._rev + 1; // ++ to taste
```