If an exchange gets hacked, then that's some pretty bad news. That would mean that tokens or coins on the exchange are not safe, but I think that it is most unlikely to occur though, because a lot of these exchanges have top notch security levels, and cannot be easily hacked. if you are not cool with leaving your coins on the exchanges, it is best you transfer them to your wallets.