<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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())