If an outlet will only ever have 2 prong devices plugged in is there any safety purpose to have a ground wire added.
Since the outlet has a ground pin, it must be protected
You certainly did have the option to fit a 2-prong outlet (NEMA 1-15), which are still sold by competent hardware stores and electrical supply houses for this very reason. By the very fact that you are asking this question, I gather you did not.
For instance, I have outlawed 2-prong outlets in our facility because we have gorillas who like to break off ground pins whenever they find a 2-prong socket.
No. If you have fit a 3-prong socket, you only have two options. You must either actually wire the ground so you have a continuous ground of sufficient size all the way back to the main panel (it can merge onto other ground paths, as long as it is wide enough)... Or pursue option #2.
Assure that the outlet is downstream of a GFCI device
... and label it "GFCI Protected / No Equipment Ground".
The GFCI protective device must protect hot and neutral coming here, and can be anywhere between here and the main panel.
The "GFCI Protected" half of the label is not required if the GFCI device is part of the socket itself, with obvious "Test" and "Reset" button.
You are not allowed to use the "No Equipment Ground" alone to guard an ungrounded 3-prong socket. You must use GFCI, or use option 1.
To revisit "actually wiring the ground"
If your house is wired with metal conduit, in most jurisdictions the intact conduit is a legitimate ground path. Your work may be done!
Some people believe that to retrofit a ground wire, they must replace the entire Romex cable. Those people really need a copy of NEC 2014. That document threw open the gauntlet for simpy retrofitting just the ground wire. Of course if the Romex cable is roached, this may be a good time to replace it for that reason.