Added isEmpty() method