added check to test if local storage is really supported