The old() function returned null, while the form_input() function expects a string. Actually it is written in the text of an error.
The old() function returns null if no value is found and no default value is defined. But since you defined it, it means that your default value also returns null.
By saying it works fine you mean
PHP Code:
<input value="<?=esc($document->title)?>">
The esc() function ignores the null value and returns as is.
The null value is always converted to an empty string