This is an interesting theme. Made a test with Terminal's command "Diskutil".
You need to know what drive names are mounted and check them with "Diskutil info "VolumeName"
In the code below, the name "Mac SD Card" says nothing about, as this is the Volume name, but you could look for the line "protocol" in the thread.result string, if it is "Secure Digital", it is for sure an SD card installed
(for example, the "Macintosh HD" protocol result is "PCI-Express").
Me, had installed a SD card permamently, so the information about this one is the following:
NameOfComputer:~ MyUsername$ diskutil info "Mac SD Card"
Device Identifier: disk3s1
Device Node: /dev/disk3s1
Volume Name: Mac SD Card
Mount Point: /Volumes/Mac SD Card
Partition Type: Apple_HFS
OS Can Be Installed: No
Media Type: Generic
Protocol: Secure Digital
SMART Status: Not Supported
Disk Size: 513.0 GB (512996932608 Bytes) (exactly 1001947134 512-Byte-Units)
Device Block Size: 512 Bytes
Device Location: Internal
Removable Media: Removable
Media Removal: Software-Activated
Device location is not forced to be "Internal", as one can also use an SD card inserted into the SD card slot of a printer.