Value type saving upon working with localStorage