Added array check