Check value is enumerable before enumerating.