Loop over slice checking if item is a page or an interface?

I have information in data files as well as content files. I need to display both from the same loop so i’ve used a scratch.

I get the data file, loop over it looking for a key’s value. If found I add it to a slice in a scratch. I then do the same for some content checking for a param’s value and if found I add that page to the slice.

The slice ends up with pages, as well as maps.

Now i’d like to loop over the slice, and on each iteration check what type of content i’m working with but getting the error below. The conditional is needed so I can get either content params or access the specific key/val in the map from the data file.
<$resource.Kind>: can't evaluate field Kind in type interface {}

Is there some conditional I can use while looping over two types of data in hugo? Or is there a better approach to working with both data and content?

I’ve solved this by create a custom dict with the key vals from the data file, as well as a custom dict from the content params. I then loop over each pushing the dicts into a single scratch which ends up as a map of the same type and containing only the fields I needed.