add null check on photos