Question: How to code an if statement with a variable not equal to NULL?

Hello! I am trying to make an if statement that is IF a bound is not equal to NULL, it does things, and if it IS equal to NULL, the bounds are set to zero. When a bound is null, they say 

bound1:=()

My first if statement will not work, please help!

 

bound1:=solve(tau(x)=(Intv||j)[1],x,useassumptions) assuming (Intv||i)[1]<=x<=(Intv||i)[2] ;  

bound2:=solve(tau(x)=(Intv||j)[2],x,useassumptions) assuming (Intv||i)[1]<=x<=(Intv||i)[2];

if bound1<>NULL;bound2<>NULL;  then

if bound1<=bound2   then  

lower:=bound1;  upper:=bound2  

else lower:=bound2;   upper:=bound1 end if;

else lower:=0; upper:=0 end if;

Please Wait...