protected bool IsNumeric(object val) { if (val == null) return false; return val.GetType() == typeof(int) || val.GetType() == typeof(double) || val.GetType() == typeof(decimal); }