Add __bool__ / __nonzero__ methods for resources.