Don't pass undefined as a query param

Undefined isn't treated like null. We can send null through and the
param will be removed from the query. This ensures we either send a
value or null.