only insert if we have a doc