Don't allow nil objects to be added to an array

When using the helper/block method arrayByEnumeratingArrayUsingBlock
Use cocoa types for sending/receiving objects to/from QS

Fixes the Automator actions, and removes redundant/confusing code.