Check for NULL inside autocomplete_free