Use call to `ensureFactoryIsNotNull(factory)` instead, please.