Raise errors if the underlying object is used after it's been closed