Input_AutoComplete_GetIdentifier return value when item is not in the list

Do we have some explanation on what is the meaning of the return value of Input_AutoComplete_GetIdentifier when the text does not correspond to any of the entries?
I know that it can return empty string, "0" or "-1" in this case. And it's painfull to check all three states every time (unless you do a wrapper function or control).
It seems to me that "0" is returned when something is typed, but it's not in the list. And empty "" is returned when nothing is typed at all. But I'm not sure if it's always like this. And I saw "-1", but don't know how to reproduce this.

Would be great to see the explanation if those different values actually mean different things. Or, if this behavior is random or not very meaningfull - to change it so that it always returns, I would suggest, empty string.
This identifier is text, which I understand, cause it can be anything, but than I don't understand why it returns "0" or "-1", like it "knows" that integer is expected.
Hi Igor,

By design, when the user doesn't type a thing it will be "" and when typed something but not selected from the list it will be "-1". So, on the action invoked by the "search/add" button you must check for both, like this: