Better validation of required input length.
Don't consume next byte for 0-byte string case.