NullPointer Exception fix

Fixed NPE: contact lookup may fail or contact photo lookup may fail. 
My code did not handle this properly. It shouldn't cause an NPE.