Prevent script from running when input contains multiple values

is there a way to prevent a C# component from running when more than 1 value is connected to an input that is set to Item Access? Some heavy operations freak out when more than 1 value is plugged in, because the script then runs for each value. And unfortunately its too easy to connect up an input with several thousand values to the wrong node.

Is there a way in C# to check that an input variable contains only 1 value?