Checking if resource's content is undefined, if so then appending empty string instead of 'undefined'.