Builder: add type conversion to ensure number of iterations is integer