Check to see if photoData exists before using