Added function to check if empty - issue #84