isComponentBetween

Check if the component is a part of the range (including both).