function getItemType(mimeType) {
        if (dndState.isDragging) return dndState.itemType || undefined;
        if (mimeType == MSIE_MIME_TYPE || mimeType == EDGE_MIME_TYPE) return null;
        return (mimeType && mimeType.substr(MIME_TYPE.length + 1)) || undefined;
      }
Determines the type of the item from the dndState, or from the mime type for items from
external sources. Returns undefined if no item type was set and null if the item type could
not be determined.