Fix a bug where the value passed into theLengthValidator could be potentially undefined