I believe nothing can be a threat to humanity. Some people might be affected but entire humanity will not extinct or become useless. Humans are known to evolve and adapt according to situations. So, AGI will help humans and save them time.