BZ-1095980: preventing NPE at runtime