handle uninitialized localStorage