in reply to Error Checking for Array Reference

Well, the code you posted has several statements, and you didn't say which one is the locus of the error. Just looking at the code, it's not even clear which statement would be assuming an array reference.

We're building the house of the future together.