Added the second case of IsPrimeZeroDim.