Photo can be null

Sometimes the caller doesn't know the photo, so will pass null
through. The code tried to dereference photo.id and crashed.