def type_of_exception(exception_object):
    """Get the type of an exception object as a string or None"""
    if isinstance(exception_object, Exception):
        return str(exception_object.__class__.__name__)