Avoid "Cannot read property 'getAttribute' of undefined" errors when element doesn't exists anymore.