Its because IsHoe is a static function not a method. So the correct code would be
It seems that the error argument #1 is 'table'; 'whatever' expected often indicates calling a static function as though it was a method.
if (ItemCategory.IsHoe(HeldItem.m_ItemType)) then
It seems that the error argument #1 is 'table'; 'whatever' expected often indicates calling a static function as though it was a method.