queue: function to check docs in queue