Fixes JVM crash on null arguments (fixes #168)