fixed issue with localstorage in ff with cookies disabled

firefox with cookies disabled panics and stops execution of the script
when checking for a localstorage-variable. added safer checking for
localstorage.