Parameter validation tweaks and associated tests.