Removing foreach entirely.
Using propertyIsEnumerable in the enumerable test.