[BUILD] Fix a buggy condition in _pull_image routine