if (defined($from_who)) { # message received } else { # error }