Added checks for invalid parameter names.