check for an image before getting it