check_mailq: adding nullmailer support

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