I think the type here should be `{string|undefined}` as there's a test for `undefined` at line 62 below.