I find a nice little safe guard nowadays is it to add in the following code to allow for the common mistake of simply putting a unit in instead of a position (happens a lot).
if (typeName (_this select 1) != "ARRAY") then {
if(typeName (_this select 2) == "OBJECT" then {
_pos = position (_this select 1);
}else{
//[West, "HQ"] globalchat format ["%1 is not TYPE ARRAY / OBJECT! Check Execution", _this select 1];
};
}else{
_pos = _this select 1;
};
edit: fixed line 2 bug