Check if a record is in an editable state

SOLVED

I'm working on a button script where I'll be looping through multiple Sales Orders, and sometimes an SO will be locked (e.g. when it has an invoice being processed).

oSalesOrder = oSession.GetObject("SO_SalesOrder_bus")
Set oSalesOrder = oSession.AsObject(oSalesOrder)
retVal = oSalesOrder.MoveFirst()
do until oSalesOrder.EoF
...

What I'd like to do is check if the record is read only, before starting into the business logic.

EditState only tells me if it is a new / existing record, not whether the record is editable... and I'd prefer to catch this up front (instead of checking for failed write() attempts). 

Does anyone know how to check this when looping using MoveFirst and MoveNext...?