Log Error and return item.null

Fixes crash with minetweaker