It's probably because you don't use a value when adding a item ($$1) to the hash table :
/addbot //hadd -s bots $$1
so $hget(table,$2) return the value, which is $null.Your $hfind work because it search in table for an item, not a value (you can search for value with the propriety .data, read the help file)
Edit : In the loop of RusselB, only $hget(<table>,%a).item will return something.You should use something like :
/addbot //hadd -s bots $$1 1
With this, $hget(bots,host) will return 1 if the host exist, and $null if doesn't.