1. You can experiment with the primaryweapon and secondaryweapon functions. They both return empty strings if they have no weapon.
2. The behaviour function will return what state the unit is in (combat, safe, etc). A unit is safe mode should have his weapon on his back. I don't know how that works if he is not carrying a weapon.
You'll just have to experiment with those functions.
behaviour unit
Operand types:
unit: Object
Type of returned value:
String
Description:
Behaviour mode of given unit ("CARELESS","SAFE","AWARE","COMBAT","STEALTH")
Example:
behaviour player
primaryWeapon vehicle
Operand types:
vehicle: Object
Compatibility:
Version 1.75 required.
Type of returned value:
String
Description:
Returns name of vehicle's primary weapon (empty string if none).
Example:
primaryWeapon player