diff --git a/lib/AnyEvent/I3.pm b/lib/AnyEvent/I3.pm
index 9c8cbbdc..7296a9c5 100644
--- a/lib/AnyEvent/I3.pm
+++ b/lib/AnyEvent/I3.pm
@@ -196,7 +196,7 @@ structure C<payload>, if specified.
 sub message {
     my ($self, $type, $content) = @_;
 
-    die "No message type specified" unless $type;
+    die "No message type specified" unless defined($type);
 
     my $payload = "";
     if ($content) {