Validate user input (query and params) to speed up returning invalid request messages and to avoid injection attacks