Added indexedDB check

Solves some conflicts I was having in browsers that do not support indexedDB, eg: Safari