Check if this.imageToClassifyUrl is not null to avoid "TypeError: this.imageToClassifyUrl.replace is not a function" error