Destroy empty galleria

Check if _waiters exists when destroying a gallery, to prevent throwing
an undefined error, that will stop people from creating new galleries.