public static ResultTypeAfterMarshilling ConvertOSBType<ResultTypeAfterMarshilling>(this Object obj)

just as one example; you might come up with a better one