Optimize DOM node detection.

The value of "typeof document.createElement('object') " is "function".