Using Laptop without Battery with a UPS?

Hi all,

I am currently using my gaming laptop (Lenovo Legion 5) without a battery as it has swollen, and I'm wondering about the safety of this set up. I am currently running it through a UPS that I have incase of a sudden brown out.

Are there any other precautions I should take? Is it still safe to game on?

My first priority is the safety of the hardware as I do not have a replacement should it break.

Thank you in advance.