Fix that avoids exception when PMIDs are bulk loaded in the database, and some do not have valid xml