MIN: Changed isinstance check to allow more types.