Is a binary tree complete?

public boolean isCompleteTree(TreeNode root) {

Queue<TreeNode> queue = new LinkedList<TreeNode>();

queue.add(root);

boolean isAbsent = false;

while(!queue.isEmpty()){

TreeNode node = queue.remove();

if(node==null){
isAbsent = true;
}else{
if(isAbsent){
return false;
}
queue.add(node.left);
queue.add(node.right);
}

}

return true;

}