Only try to write out to SQL queued items if they exist