public BTPosition<T> checkPosition(Position<T> p)
			throws InvalidPositionException {
		if (p == null || !(p instanceof BTPosition)) {
			throw new InvalidPositionException("Position is invalid");
		}
		return (BTPosition<T>) p;
	}