This is what may be happening, if the value of item.photo is undefined then item.photo != '' will always show as true. And if you think logically it actually makes sense, item.photo is not an empty string (so this condition comes true) since it is undefined.
Now for people who are trying to check if the value of input is empty or not in Angular 6, can go by this approach.
Lets say this is the input field -
<input type="number" id="myTextBox" name="myTextBox"
[(ngModel)]="response.myTextBox"
#myTextBox="ngModel">
To check if the field is empty or not this should be the script.
<div *ngIf="!myTextBox.value" style="color:red;">
Your field is empty
</div>
Do note the subtle difference between the above answer and this answer. I have added an additional attribute .value after my input name myTextBox.
I don't know if the above answer worked for above version of Angular, but for Angular 6 this is how it should be done.
ng-if="item.photo != ''"attribute?item.photois not an empty string, butnullorundefined?