Changed tableHasKey to use native isDefined func