Query parameters are optional by their nature. So if you add a <query-param name="trip"> to your mapping, the mapping will match even if there is no trip parameter. In this case the bean property will be set to null.
So you can simply add all the query parameters that MAY occur to the mapping. This has many advantages to your current approach. Especially you don’t have to parse the query string by yourself.
Do you play Magic?
Get TopDecked MTG, the #1 Magic App, built by players, for players. Free to use, forever.