Hi @sarahamperandsand-com
I believe you can use the get_sub_field_object()
function to do it. With this function, you can check the ‘type’ value in the returned data. This page should give you more idea about it: https://www.advancedcustomfields.com/resources/get_sub_field_object/.
I hope this helps 🙂