WFLY-2712 NPE check

https://issues.jboss.org/browse/WFLY-2712 - just minor fix to prevent NPE