Update Danger.js

The hasAttribute method requires IE8 Standards mode, while getAttribute is supported also in IE8 compatibility mode. In the limited context of a named attribute expecting to return an integer, checking for null and empty string on getAttribute would be largely equivalent to the result of hasAttribute. This seems to me the only way to extend support to IE8 in compatibility mode since hasAttribute cannot be shimmed. However, I'm not sure this is the only place where changes are needed to support IE8 in compatibility mode.