doubled error condition check with same code moved from
processLower/Upper to accumulateInput for having it implemented only one
time there