catch invalid document inserts