Using Grid variables in Python script

Hi,

 

Does anyone know how to compare Grid variable with NULL/blank in Python script.

 

empty_list = [[mygridvar]] -- I want to pass the variable here, so I can compare it with NULL

if not empty_list:

 print "The list is empty"

 exists = 1

else:

 print "The list is not empty"

 exists = 0

  

context.updateVariable('exist_check', exists)

print(exist_check)

 

I want to make sure three columns in a table populates data, if they don't then trigger an SNS message.

 

I used query result to Grid Variable component and then grid iterator component to pass the value in Python script, but not able to figure out how to compare the NULL with list.

I tried to do above in If component, too but not sure how to use the Grid variable in If component, specifically, the grid variable inputs in condition property.

It would be great if anybody has an answer for either the Python script or If component.

 

Thank you.