added function to check if hash is empty