Ensure that the documentModel is set before adding it to the querystring