fix #10 properly check for array values existing in python and add overall error trap