[WFLY-490] Fix NPE when there is no resource