IE8 Bugfix - JavaScript Error "Object doesn't support this property or method"

Fixed a bug when IE8 elem[ type ] triggers "Object doesn't support this
property or method" by checking typeof elem[ type ] against "unknown".