more elegant way to delete params if nil in get requests