SyntaxFix
Write A Post
Hire A Developer
Questions
There is also a type - JTokenType.Undefined.
This check must be included in @Brian Rogers answer.
token.Type == JTokenType.Undefined