Is there a way to find out if a subscript is out of range in an array?