Added array validation.