Check that context manager has __exit__ method