Avoid a NullPointerException when can’t detect a charset.