Changed back syntax on line to test for empty resource_format