Hope you good people might be able to help me figure out what I'm doing wrong, because I've been fighting with this for *hours* and I'm about ready to give up...
I have what I think is a trivially simple requirement: Using the AzureAD connector in a flow, I retrieve the set of groups a user is a member of using the action "Get groups of a user (V2)" the output of which is an array of group ID's. I then need to parse through that collection & determine which group(s) are dynamic membership - because you can't call the remove user from a group action against a dynamic group - if you try it throws an error...
I send the output of "Get groups of a user (V2)" into an apply to each loop, and call the Get Group action against each group in the collection, in order to get all of the properties of each group.
The property which tells me if it's dynamic or not is "grouptypes"... unfortunately it is not in the set of properties offered by the dynamic content of the get group action, but I can see that it IS in the body of the output. So I then send the body from get group to a Parse_JSON action, which IIUIC breaks out all of the name-value property pairs into individual elements which I can then reference. This much is all good so far... Inspecting the output of the Parse_JSON action I can see the attribute is there, and it also appears in the dynamic content of the action:


This is where it starts to go sideways - I want to test the value of grouptypes in a condition... First problem - if the Grouptypes property is empty (which it legitimately can be), the condition throws an error because it doesn't like the tested element being null.
What I see is this:

Which I think is telling me that it fails because the element I'm inputting (the Grouptypes item) isn't a valid array?... here's the relevant actions:

The input there is selected from the Dynamic content of the Parse_JSON action, which as can be seen above definitely IS there, IS typed as array, and DOES have the value "DynamicMembership"..
Ive tried pretty much every likely operator on the condition (contains, starts with, equals, etc. etc.) Every one gives me the same error that the input to the condition is invalid...
The odd thing is that this still happens even when the grouptypes data item DOES contain the tested value, - but looking at the raw output I wonder looking at the structure - a genuinely empty value (the group is NOT dynamic) looks like this:
Looking at another group which IS dynamic, the structure is this:

Is there something hooky going on there with array elements? - in order to successfully test that value, do I need to reference into a specific array element?
NB: when that thought first occurred to me, I put the Parse_JSON dynamic content item Grouptypes (which is supposed to be an array remember) into another Apply to each loop, thinking that this surely would pull out each indivdual element..
No Matter what I do, if I try to reference that grouptypes value in any way, it throws an error....
I simplified it way down, & threw out the condition action entirely, even with nothing more than this:

The Apply to each action throws this error:

Which suggests to me that it doesn't even accept the dynamic content as input to the action?
PLEASE could someone (anyone!) suggest what's going on?? - I;m getting really quite frustrated with this now...
TIA
Paul G