very light fault tolerant localStorage/sessionStorage wrapper