Unable to check result "undefined" in cli

https://issues.jboss.org/browse/WFLY-4118
Joe, I know this is already merged, but can you send up a PR adding the copyright header to this class? Thanks.

And thanks for the patch!