error handling for elements without an id