def safe_issubclass(cls, classinfo):
    """As the builtin issubclass, but returns False instead of a TypeError if the first argument is not a class."""
    try:
        return issubclass(cls, classinfo)
    except TypeError:  # cls is not actually a class
        return False