WFLY-1449 Fix NPE in CacheFactoryAdd

The commit here fixes the NPE which was reported in the forum thread https://community.jboss.org/message/821146#821146