Unable to check result "undefined" in cli

https://issues.jboss.org/browse/WFLY-4118