Fix localStorage issue with string/number values