Is there a way to find out if value exists with addToSet?
MongoDB does not return the results of field-level updates like an $addToSet operator; the overall document update either succeeds or fails.

However, assuming you are using MongoDB 2.6 or newer, you can infer whether the update was a no-op by inspecting the WriteResult returned on update/upsert.

Example below using MongoDB 3.2.

Test data:

db.fruit.insert([
    { _id: 'a', tasty: ['apple', 'banana', 'pear']},
    { _id: 'b', tasty: ['kumquat', 'banana', 'mango']},
    { _id: 'c', tasty: ['plum'] }
])


Value was added to array

Add "mango" to the tasty array in the a document:

db.fruit.update(
    { _id: 'a' },
    { $addToSet: { 'tasty': 'mango' }}
)

WriteResult({
  "nMatched": 1,
  "nUpserted": 0,
  "nModified": 1
})


Since the only possible update was to the array, nModified:1 indicates that "mango" was added.

Value already exists in the array

Add "mango" to the tasty array in the b document:

db.fruit.update(
    { _id: 'b' },
    { $addToSet: { 'tasty': 'mango' }}
)

WriteResult({
  "nMatched": 1,
  "nUpserted": 0,
  "nModified": 0
})


Since the only possible update was to the array, nModified:0 indicates that "mango" already existed.

Updating with more fields

If you combine multiple field updates, you won't know which field was actually updated. In this case, you could specifically match documents where the array value isn't set already:

db.fruit.update(
    // query
     {
         _id: 'c',
         tasty: { $nin: ['mango'] }
     },

     // update
    {
        $set: { fruitBasket: true },        
        $addToSet: { 'tasty': 'mango' }
    }
)

WriteResult({
  "nMatched": 1,
  "nUpserted": 0,
  "nModified": 1
})