Throws exception when array is empty.