Unfortunately, I don’t think it’s possible to “detect” imported SVGs. The thing is that XD “converts” SVGs to native XD layers when importing them, and I don’t believe that there’s any metadata that can be used to consistently detect whether any given layer has been imported as SVG.
While this probably isn’t the answer you’re hoping for, I hope it still helps.
My solution was to prefix the SVG files I import and then identify them by name. For example: all of my icons start with “icon_”.
But it would be great if the XD team added this functionality to automatically mark all bitmaps and SVGs to be exported. I am working with two documents that have thousands of layers and it is very difficult to keep checking these type of assets all the time to be exported every time I change or add something to the document.