avoiding NPE in JDK 1.8.0_20 compiler