code: protected boolean checkValid() throws InvalidItemStateException
     {
        try
        {
           session.checkLive();
        }
        catch (RepositoryException e)
        {
           throw new InvalidItemStateException("This kind of operation is forbidden after a session.logout().", e);
        }
  
        if (data == null)
        {
           throw new InvalidItemStateException("Invalid item state. Item was removed or discarded.");
        }
  
        session.updateLastAccessTime();
        return true;
     }
docs: Checking if this item has valid item state, i.e. wasn't removed (and
  saved).
  
  @return true or throws an InvalidItemStateException exception otherwise
  @throws InvalidItemStateException