API: make sure not to include empty parameters