How to programmatically check whether an order is shipped?

An order is shipped (maybe partially) if has shipment documents.