Also modifies param type checking code to remove whitespace from around params before splitting them into k=v pairs. Fixes #8199