The company's investment in safety prevention comes amid growing concerns over the potential harm of artificial intelligence.