The code line worked, wasn't able to deliberately create any soft lock or seen any odd effects.
So yes it suitable to stop odd chance of the problem occurring.