private bool? foo(object obj) { this.singleBitValue = obj as bool?; this.singleBitValue = obj as bool? ?? false; return true ? true : false; } }