This should be:

if (!operation.get(OP).asString().equals(ADD)) { // note the !
  // write-attribute operation