Add .contents() method to collections