Don't use maxTypeid = null never, because

null = null --> FALSE

right statment :

if maxTypeid is null then
dbms_output.put_line('no data');
else
dbms_output.put_line('a' || maxTypeid || 'b');
end if;