make unsupported or broken localStorage not break js