[Error: The storage you have specified does not exist] when the Array prototype is extended

The following code doesn't work correctly when the Array class is extended:

  for (var i in storage) { 
    if (!config.storage[storage[i]]) {
      throw new Error('The storage you have specified does not exist');
    }
  }

the code should be:

  storage.forEach(function(s) {
    if (!config.storage[s]) {
      throw new Error('The storage you have specified does not exist');
    }
  })

code above avoids iterations over extended methods