check_mailq: adding nullmailer support

Just turning attached patch of github issue #840 into a push request.
(Closes #840)