Check to see if photoData exists before using

A fix for issue CB-5698: https://issues.apache.org/jira/browse/CB-5698

Image files that for one reason cannot be copied will crash. Returning
when photoData returns nil prevents the crash.