Cross browser check for elementType