add O(1) isEmpty method to immutable set for better efficiency