Yes, it is safe but if you use a bad DNS it'll harm to your device or network. So, be careful before change your DNS.