error handling for elements without an id

Didn't get this one added in time before you merged the last pull request. Here's some error handling that should address the issue you were seeing (elements in localStorage without a corresponding DOM on the page).