Yep, I'd go for `elseif (defined($name))` and an exception in else. :)