var element = null;
element.getAttribute(‘id’); // exception "TypeError: Cannot read property ‘getAttribute’ of null"
view raw gist_js_null.js hosted with ❤ by GitHub