title: Angular 4 check if local storage is available in browser
body: <p>Is it possible to make a check to see if local storage is available in the user's browser?  I have heavily used local storage and want to check if there are cases where I need to instead use cookies. I guess I can try to use localstorage and catch an error if it doesn't work and fallback to cookies, but is there a better way than this?</p>