improve type check on Number argument in c.c/repeat