Issue #1648, autocomplete helper couldn't handle nil values