Add a function for bounds checking.