when open document, check if provider is nil