adds a more robust method of checking for arrays
Merge pull request #2 from zafarali/RobustArrayCheck

adds a more robust method of checking for arrays