By default, an undefined cell contains a value of 0. Values outside of the array dimensions also result in 0.
You can enter your own string or value that you don't plan on using otherwise to define an undefined cell, and compare values to look for your specified value/string.
For example, in my game I wanted to differentiate between empty or out of bounds in my array. Since I did not plan to use negative values, I filled the array with -1 on start of layout. Then I could compare to see that -1 was empty, 0 was out of bounds, and anything else was a valid data value.