if (!$chan($chan).topic) works, but it's possible to set a topic to 0 or $false, so if ($chan($chan).topic == $null) is a more thorough check.


New username: hixxy