Fixes the error: Cannot read property 'nextSibling' of null

When enter an existing room without participants, it gives the error: Cannot read property 'nextSibling' of null. As a result first, script execution is stopped, and the first user cannot be connected. This condition fixes the issue.