add array definition checks