Add null checks to MenuItem#getItemStack