Added type checking to parse_resource_extended to prevent segmentation fault caused when resource_name is an integer.