Ensure embedded document arrays are converted to documents before attempting to validate them