My guess is that you are connected to a database locally and there is no alias such as would be used for a remote connection (the alias is the same as the database and a null value is being returned).
You could use:
select coalesce(INPUT_DB_ALIAS, DB_NAME) from TABLE (snapshot_database(cast (NULL as varchar(8)) , -2 )) as database
This would return the DB_NAME if INPUT_DB_ALIAS is null.