I would expect dig to respond in this manner:
dig +short www.google.com && echo SUCCESS || echo FAILURE
I would expect dig to respond in this manner:
dig +short www.google.com && echo SUCCESS || echo FAILURE