or rather:

    if (message == null) throw new InvalidMessageException("Message is null")