deconstructor: check for frontier before length