Added isEmpty method & test for it