Checking if the object is inbounds