handle uninitialized localStorage
Merge pull request #2 from terrywbradyC9/master

handle uninitialized localStorage