Returns the ordinal of the value of the item pair in the dictionary.
        
        :param dict orderby_item:
        
        :return:
            0 if the item_pair doesn't have any 'item' key
            1 if the value is undefined
            2 if the value is a boolean
            4 if the value is a number
            5 if the value is a str or a unicode
        :rtype: int

def getTypeOrd(orderby_item):
        """Returns the ordinal of the value of the item pair in the dictionary.
        
        :param dict orderby_item:
        
        :return:
            0 if the item_pair doesn't have any 'item' key
            1 if the value is undefined
            2 if the value is a boolean
            4 if the value is a number
            5 if the value is a str or a unicode
        :rtype: int
        """
        if 'item' not in orderby_item:
            return 0
        val = orderby_item['item']
        if val is None: return 1
        if isinstance(val, bool): return 2
        if isinstance(val, numbers.Number): return 4
        if isinstance(val, six.string_types): return 5

        raise TypeError('unknown type' + str(val))