small note - add brackets for the initial condition

    if (isContactPhoto(uri) {
        return getContactPhoto(uri));
    } else...