Adding entity with SafeMode.True?

Insert by default does not check whether the document was inserted which is awkward if there is any unique index in place. Solution is to use safe index, or in other words use insert with SafeMode.True.