Typescript If Not Empty Python Queue