public static bool ToBool(this object anObject) { bool ret = false; try { ret = Convert.ToBoolean(anObject); } catch (Exception) { } return ret; }