Reformat resource_not_found checking