Refactored check.input.value.length to deal with nlevels as well