Check for the existence of the action index before testing the value
Merge pull request #1458 from JeffPyeBrook/pr-1457-check-array-value-exists

Check for the existence of the action index before testing the value