def isofsubclass(x, px):
    """
    isofsubclass(x, px) -> bool

    Returns whether a type 'x' is a subclass of type 'px'.

    Args:
        x (type): the input type.
        px (type): the parent type to check.
    """
    try: return issubclass(x, px)
    except: return False