Fixed NPE: contact lookup may fail or photo lookup may fail.