adding nil checks to the query params util