[llvm-readobj] Unwrap the value first to avoid the error

This addresses the issue introduced in r369169, we need to unwrap
the value first before we can check whether it's empty. This also
swaps the two branches to put the common path first which should
be NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369177 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed