handle null and disposable resources more gracefully in abstraction layers.