'Helper function which returns the ``TYPE`` feature of the ``item``,
if it exists, otherwise it returns the ``item`` itself'

def _get_type_if_possible(self, item):

    if (isinstance(item, dict) and (TYPE in item)):
        return item[TYPE]
    else:
        return item
