Convert ``string`` or ``bool`` to ``bool``.

def parse_bool(cls, value, default=None):
        """Convert ``string`` or ``bool`` to ``bool``."""
        if value is None:
            return default

        elif isinstance(value, bool):
            return value

        elif isinstance(value, str):
            if value == 'True':
                return True
            elif value == 'False':
                return False

        raise Exception("Value %s is not boolean." % value)