Could the behaviour of returning null as the hash of null sourceContents be moved into the utility method?