US President Joe Biden has threatened Iran with war if there is an assassination attempt on Donald Trump.