Minor bug fix: null check with bool cast fixed.