Handle revision=='NULL'