SyntaxFix
Write A Post
Hire A Developer
Questions
Boolean types can be null. You need to do a null check as you have set it to null.
Boolean
null
if (bool != null && bool) { //DoSomething }