public static bool? IsActionAllowed(this ICmisObject obj, string action) { try { return obj.AllowableActions.Actions.Contains(action); } catch(NullReferenceException) { return null; } } }