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.
Merge pull request #1 from codepiano/ignore_empty_and_string

ignore empty object and plain string in function tok()