getValue returns a promise or calls a callback

getValue shouldn't return a string since we load the resources
asynchronously. It either returns a promise for a string, or calls a
callback passed as a third parameter.