Added Null check for photo path