Check for "air" within a chest minecart

im making a GUI for my data pack, though i am currently stuck trying to detect for air within the minecart chest i am using for said GUI.

how would i go about checking for any empty slots in the minecart chest, and additionally how would i detect the contents of specific slots?

Thanks in advance!

Continue to help post