Fixed localStorage error, when getting undefined key