public static TypeCode GetTypeCode (object value) { if (value == null) return TypeCode.Empty; else return Type.GetTypeCode (value.GetType ()); }