Mattel has apologised for an X-rated gaffe on some of its Ariana Grande merchandise for the upcoming Wicked film.