Added some null checks to ingot piles to prevent crashes.