Fix issue #137, test message existence by using message!=null rather than using message