Function to check that a value x is between two values.
x
isInBounds(x, lower, upper)
The value to check.
lower
The lower bound.
upper
The upper bound.