added isEmpty method to Collection