[BZ-1075631] avoid NPE when calling KnowledgeBuilderFactory.newKnowledgeBuilder(null)
(cherry picked from commit 2b1153ef78965e65e0886da8252de5be963cc867)