Avoid calculating the hash if hashtable is empty