Make it like:

if (System.getProperty("fs.s3n.awsAccessKeyId") != null) {
        tConf.set("fs.s3n.awsAccessKeyId", System.getProperty("fs.s3n.awsAccessKeyId"));
}