checks if a tree is a full binary tree


I have to write an algorithm that checks if a tree is full binary tree (each node, except the leaves, must have 2 children), but I don’t know if this version is correct.

 isComplete(u)  {         if(u == NULL)                 return false         else         {                 left = isComplete(u.left);                 right = isComplete(u.right);                 complete = left && right;                  return complete.         } }