detect localstorage