Behold, I say unto you, that the house of Israel was compared unto an olive tree, by the Spirit of the Lord which was in our father; and behold are we not broken off from the house of Israel, and are we not a branch of the house of Israel? 1 Nephi 15:12
Was Israel ever compared to an olive tree in the Bible before 600 BC when 1 Nephi was written?
The prophet Zechariah wrote about two olive trees (written around 470 BC), but the angel in the vision explains them to be the ones who were anointed to serve the Lord. Zechariah was writing about Zerubbabel (the governor) and Joshua (the priest) sent to rebuild Jerusalem by order of the Persians.
Paul, by 60 AD, wrote about olive branches.
If some of the branches have been broken off, and you, though a wild olive shoot, have been grafted in among the others and now share in the nourishing sap from the olive root, do not boast over those branches. If you do, consider this: You do not support the root, but the root supports you. You will say then, “Branches were broken off so that I could be grafted in.” Granted. But they were broken off because of unbelief, and you stand by faith. Do not be arrogant, but be afraid. For if God did not spare the natural branches, he will not spare you either. Romans 11:17-21
Here Paul talked about grafting in Gentiles into God's plan and purpose, much like a person can graft an olive branch into the olive tree.
Nephi seems to be talking about Paul's statement in Romans, referencing something that wasn't spoke about until 600 years later. There is no reference to Israel being an olive tree.