Added isEmpty functions.