alert if localStorage type is undefined.