#7 - make sure localStorage exists before attempting this