Add `toJSON` alias of `valueOf`.
Add `isFunctionSnippet` helper.