Type not JSON serializable

I might be misunderstanding the error, but the issue occured when setting the ‘value’ of a dropdown option to a type object. This would in theory result in the type object being passed as the value of the callback to my evaluating function, where i could then call a classmethod or the constructor of that type, get the classes signature etc…

I managed to make it work passing type.__name__ instead and later evaluating that against class.__subclasses__().__name__ and calling a constructor on that subclass.

As in:

if inputValue is not None:
   for subclass in Class.__subclasses__():
      if subclass.__name__ == inputValue:
         sign = [p for p in inspect.signature(subclass.__init__).parameters]

EDIT
What i would have liked to do:

if inputValue is not None:
   sign = [p for p in inspect.signature(inputValue.__init__).parameters]