Exception in random numbering node

So this code block takes four inputs - a minimum value, a maximum value, a minimum void, and a maximum void.
It then crates a random list just like the Math.Random node. It then finds the midpoint of the void (half way between the minimum void and the maximum void). It then tests if any of the resulting numbers are between the minimum void and the midpoint of the void, and generates a new random number between the minimum value and the minimum void, and replaces the initial input with that. Numbers which weren’t between the minimum void and the midpoint of the void and tests if they are between the midpoint of the void and the maximum void, and replaces them with a random number between the maximum void and the maximum number.

This maintains some of the initial dispersion of the randomization - that is if a number was randomly in the lower half of the void it is replaced with a number below the void, and if a number is in the upper half of the void it will be replaced by a number above the void.

Inputs =
	{TotalNum, MinNum, MaxNum, MinVoid, MaxVoid};

InitialList =
	Math.Random(
		MinNum,
		List.OfRepeatedItem(
			MaxNum,
			TotalNum
		)
	);

HalfVoid =
	MinVoid + (MaxVoid - MinVoid) / 2;

VoidedList =
	InitialList > MinVoid && InitialList < HalfVoid?
		Math.Random(
			MinNum,
			MinVoid
		):
		InitialList > HalfVoid && InitialList < MaxVoid?
			Math.Random(
				MaxVoid,
				MaxNum
			):
			InitialList;