How Mindy Kaling’s ‘worst Hollywood experience’ was the ‘best thing that ever happened’ to her