Oh, okay I get it. NaN is what happens when you attempt to write a "" value from WebStorage to a number variable, which I assume is what's happened to you here.
I can't find any way to check for NaN, so I recommend this: You first need to send a value to WebStorage before you can retrieve from it. I suggest using a global variable (CurrentScore) and only recording to WebStorage at the end of each level, and only pulling in your score from WebStorage when you load a saved game instead of trying to pull it actively right at the beginning of the game.
A global variable will keep throughout your entire play session, so you don't need to actively write to and read from WebStorage the whole time.
Either that, or initialise your WebStorage keys - just set them to "0" on layout start.