Added isEmpty method