added validation of input to primeFactors challenge