Expose "kind" to JS
Check for NULL on kind

Expose as “” when NULL
Switch pattern's check for NULL to ternary operator

(To be consistent with “kind”’s check)
Merge pull request #3 from FriendCode/master

Expose "kind" to JS