Fix possible NPE when lookup up contact photos
Fix exception when looking up contact photo but UI is not ready yet