def is_valid(self) -> bool:
        """
        :return:
            ``True`` if the reference is valid, hence it can be read and points to a
            valid object or reference.
        """
        try:
            self.object  # noqa: B018
        except (OSError, ValueError):
            return False
        else:
            return True

        :return:
            ``True`` if the reference is valid, hence it can be read and points to a
            valid object or reference.
        
git/refs/symbolic.py