Here you're assuming that delayLength is a value input, which it might not be. You calculate this below anyway, so I think this line can be omitted altogether.