Minor fix while checking if localstorage is present.