If we rely on "filetype" being part of the "properties" array we should probably move the logic out of the if condition about the value of the "id" property.