You can simplify this check to
```if (photo_row)```