I think this should be called hasFunction as there are also variables in a lua state