avoid npe when world can't be retrieved from tileEntity and entity.