fixed error with photoArrayObject throwing undefined, now checks if first photo doesn't exist