There will be no hangs, the worst thing is that two objects may be created.
Of course, you can create a protection, for example, check for the number of objects or limit the number of attempts to create an object.
But yes this is not a good solution, because the created objects may be unnecessary.
There is another option to define random coordinates on the object and pick the object by them, if the expression is true then only then create an object there.