Fixed output sanitization type checking when the return type isn't a class.
Full changelog
[BUGFIX] Fix output sanitization type checking (#1467)
In the inspection output, we check function's return types via issubclass to see if an optimization can be made. Guard against this check in case the return type isn't a class -- it could be a Union[..., ...] from a conditional.