def IsSubclass(candidate, parent_class):
    """Calls issubclass without raising an exception.

  Args:
    candidate: A candidate to check if a subclass.
    parent_class: A class or tuple of classes representing a potential parent.

  Returns:
    A boolean indicating whether or not candidate is a subclass of parent_class.
  """
    try:
        return issubclass(candidate, parent_class)
    except TypeError:
        return False
