Verifies if a given position is contained within the range
bool contains(Object? position) { if (position is! int) { return false; } return start <= position && end > position; }