Take a look at IfTableMib, it is doing something like this already - Availability is set to 100% when ifOperStatus = 1. There are three destAttrs to look at: OperStatus, OperStatusPollable, and Availability. There are two status attributes for historical reasons; OperStatus is used for discovery & filtering, OperStatusPollable is a polled metric you can report on.
Here are the expressions from IfTableMib:
<Expression destAttr="OperStatus">ifOperStatus</Expression>
<Expression destAttr="AdminStatus">ifAdminStatus</Expression>
<Expression destAttr="OperStatusPollable">ifOperStatus</Expression>
<Expression destAttr="AdminStatusPollable">ifAdminStatus</Expression>
<Expression destAttr="Availability">(ifOperStatus == 1) ? 100 : 0</Expression>
The expression you found is the same thing, only with an isdef included for safety, and on a different attribute.