Solved by tom in post #3 
              
              
                The typical thing is to just take a tensor argument (const Tensor& or Tensor). Then test t.defined(). 
None is translated to an undefined Tensor. 
Best regards 
Thomas