Prevent NullPointerException in AppUtils

It is too bad, but we cannot really do anything about finding
the main() method if the current thread does not contain it. Fail
gracefully.

Noticed by Albert Cardona.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>