Gets object type by type descriptor.

        :param descriptor: a type descriptor that points to an object type

        :return: the object type or null is the type wasn't found.

def get_type_by_descriptor(descriptor):
        """
        Gets object type by type descriptor.

        :param descriptor: a type descriptor that points to an object type

        :return: the object type or null is the type wasn't found.
        """
        if descriptor == None:
            raise Exception("Type descriptor cannot be null")

        return TypeReflector.get_type(descriptor.get_name(), descriptor.get_library())