avoid TypeError when deleting session no longer in cache