Improved getQueryParam and getBodyParam