ignore empty object and plain string in function tok()

empty objects and plain strings in variable 'this.tokens' will result
in additional 'undefined' string in the output of the
'Parser.prototype.parse' function.It will pollute the search_index.json,
product a lot of 'undefinedundefined...' index.