Catch localStorage security error when cookies are blocked (Chrome)

If cookies are disabled on Chrome, `window.localStorage` throws an error
`Uncaught Error: SecurityError: DOM Exception 18`