This is a rather easy one. I was adding my filtering values in my local storage and had to check if a "library" key existed.
if(localStorage.getItem('library') !== null) { // do stuff
Buy me a drink 🍺 to keep me motivated to create free content like this!