def is_subclass(obj, test_obj):
    """
    Extra check to ensure test_obj is a class before
    checking for whether it is a subclass. Prevents Python from
    throwing an error if test_obj is not a class but a function
    """
    return isinstance(obj, type) and issubclass(obj, test_obj)