Add bounds checking to vector type