Clean up handling of null parameters so they can be re-used by consecutive calls