Hi,
I’m working with Json and I have a variable FieldValue of type JToken. I want to check if it is null.
I’ve tried using the following
- FieldValue.Type.Equals(JTokenType.Null)
- FieldValue.Type.Equals(JTokenType.Undefined)
- FieldValue.Equals(Newtonsoft.Json.JsonToken.Null)
But all of them are giving me this error Object reference not set to an instance of an object
Any help will be much appreciated.
Thanks in Advance