More null deref checks in ht.c