LPS-47045 update document creation to ensure proper creation of types