fix unhandled errors in chrome

$window[storageType] would throw unhandled error in Chrome some cases as browserSupportsLocalStorage() had not yet been called.