Is there a way, through the API, to look at a specific bag slot and tell if there is anything in it?
Yes, see https://wow.gamepedia.com/API_GetContainerItemID It returns nil if there is nothing in a bag slot
nil