{"name":"isNull","title":"isNull","type":"command","url":"https://community.bistudio.com/wiki/isNull","revid":379531,"updated":"2026-10-31T00:51:14Z","groups":["Variables"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Checks whether the tested item is null.\nWhich null type the item has to be equal to depends on the type of game entity tested:\n\n|  |  |  |  |  |  |  |  |  |  |  |\n|---|---|---|---|---|---|---|---|---|---|---|\n| Type | Object | Group | Control | Display | Location | Task | Script | Config | Diary Record | Team Member |\n| Null value | objNull | grpNull | controlNull | displayNull | locationNull | taskNull | scriptNull | configNull | diaryRecordNull | teamMemberNull |\n| Since | Operation Flashpoint v1.00 |  | Armed Assault v1.00 |  | Arma 2 v1.00 |  | Arma 3 v1.30 | Arma 3 v1.54 | Arma 3 v2.00 | Arma 3 v2.10 |\n\n> [!IMPORTANT]\n> A test via == does **not** work because a null value is not equal to anything, not even itself (configNull being the exception).\n> See also isEqualTo.","syntaxes":[{"syntax":"isNull entity","params":[{"name":"entity","type":"Object, Control, Display, Group, Location, Task, Script Handle, Config, Diary Record or Team Member","type_expr":"Object | Control | Display | Group | Location | Task | Script Handle | Config | Diary Record | Team Member"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"entity"}}],"examples":[{"text":"```sqf\nif (isNil \"obj\") exitWith { hint \"obj variable is undefined\" };\n\nif (isNull obj) then\n{\n    hint \"obj variable is defined but is null\";\n}\nelse\n{\n    hint \"obj variable is defined and is not null\";\n};\n```","code":["if (isNil \"obj\") exitWith { hint \"obj variable is undefined\" };\n\nif (isNull obj) then\n{\n\thint \"obj variable is defined but is null\";\n}\nelse\n{\n\thint \"obj variable is defined and is not null\";\n};"]},{"text":"Diary Record support before Arma 3 v2.00:\n\n```sqf\nprivate _nullRecord = objNull createDiaryRecord []; // wrong parameters = failure to create a record = null value\nprivate _createdRecord = player createDiaryRecord [\"Diary\", [\"title\", \"description\"]];\nif (_createdRecord isEqualTo _nullRecord) then { hint \"Failed\" };\n```\n\nTeam Member support before Arma 3 v2.10:\n\n```sqf\nprivate _isNull = _teamMember isEqualTo teamMemberNull;\n```","code":["private _nullRecord = objNull createDiaryRecord []; // wrong parameters = failure to create a record = null value\nprivate _createdRecord = player createDiaryRecord [\"Diary\", [\"title\", \"description\"]];\nif (_createdRecord isEqualTo _nullRecord) then { hint \"Failed\" };","private _isNull = _teamMember isEqualTo teamMemberNull;"]}],"see_also":["controlNull","displayNull","grpNull","locationNull","objNull","taskNull","teamMemberNull","scriptNull","configNull","typeName"]}