T-SQL :
declare @var1 varchar(30), @var2 varchar(30);
select @var1 = null, @var2='';
select isnull(@var1, 'aa') as var1, isnull(@var2, 'aa') as var2;
PL/SQL : (the following does not work although it looks like it should work)
DECLARE var1 varchar(30):= '', var2 varchar(30):= null;
select nvl(var1, 'A value') var1, nvl(var2, 'A value') as var2 from dual;
First it complained about the comma, then it complained about end of file.
So I kept fumbling and tumbling until I found this answer which I totally do not expect.
See my answer to end your frustration.
Above is the version I have. Try to write something like this (like in T-SQL) to test their NVL function but I kept getting unexpected error dialog from Developer's IDE.