Joe Biden has said he would sign legislation banning popular video-sharing app TikTok in the United States.