Firefighters say to keep the door closed, it significantly increases your chances of surviving a fire. And if you smell smoke, FEEL IT before you try to open it. If it's hot, go straight to the window.
Having said all that, I have a cat, and don't have room for a litterbox in my bedroom, so open it is!
Her sainted predecessor slept out of our room but often with our kids. But she's gone, the kids are independent adults in other states with their own cats, and this little cat started off too young to be left alone all night, so the pattern was set. The main difference now is she has the run of the apartment as well, and the litterbox and food are out there. I'm a pushover for a cozy feline.