Index: trunk/ippScripts/scripts/calibrate_dvo.pl
===================================================================
--- trunk/ippScripts/scripts/calibrate_dvo.pl	(revision 16561)
+++ trunk/ippScripts/scripts/calibrate_dvo.pl	(revision 16563)
@@ -183,5 +183,5 @@
 
     carp($msg);
-    if ($cal_id && $region && $last_step && $status and not $no_update) {
+    if (defined $cal_id && defined $region && defined $last_step && defined $status and not $no_update) {
         my $command = "$caltool -addcalrun";
 	$command .= " -cal_id $cal_id";
Index: trunk/ippScripts/scripts/camera_exp.pl
===================================================================
--- trunk/ippScripts/scripts/camera_exp.pl	(revision 16561)
+++ trunk/ippScripts/scripts/camera_exp.pl	(revision 16563)
@@ -313,5 +313,5 @@
 
     carp($msg);
-    if ($cam_id and not $no_update) {
+    if (defined $cam_id and not $no_update) {
 	my $command = "$camtool -addprocessedexp -cam_id $cam_id -uri UNKNOWN -code $exit_code";
 	$command .= " -dbname $dbname" if defined $dbname;
Index: trunk/ippScripts/scripts/chip_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/chip_imfile.pl	(revision 16561)
+++ trunk/ippScripts/scripts/chip_imfile.pl	(revision 16563)
@@ -206,5 +206,5 @@
 
     carp($msg);
-    if ($chip_id and $class_id and not $no_update) {
+    if (defined $chip_id and defined $class_id and not $no_update) {
 	my $command = "$chiptool -addprocessedimfile";
 	$command .= " -exp_id $exp_id";
Index: trunk/ippScripts/scripts/detrend_correct_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_correct_imfile.pl	(revision 16561)
+++ trunk/ippScripts/scripts/detrend_correct_imfile.pl	(revision 16563)
@@ -132,5 +132,5 @@
 
     carp($msg);
-    if ($det_id and $exp_id and $class_id and not $no_update) {
+    if (defined $det_id and defined $exp_id and defined $class_id and not $no_update) {
 	my $command = "$dettool -addcorrectedimfile";
 	$command .= " -det_id $det_id";
Index: trunk/ippScripts/scripts/detrend_norm_apply.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_norm_apply.pl	(revision 16561)
+++ trunk/ippScripts/scripts/detrend_norm_apply.pl	(revision 16563)
@@ -183,5 +183,5 @@
 
     carp($msg);
-    if ($det_id and $iter and $class_id and not $no_update) {
+    if (defined $det_id and defined $iter and defined $class_id and not $no_update) {
 	my $command = "$dettool -addnormalizedimfile";
 	$command .= " -det_id $det_id";
Index: trunk/ippScripts/scripts/detrend_norm_calc.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_norm_calc.pl	(revision 16561)
+++ trunk/ippScripts/scripts/detrend_norm_calc.pl	(revision 16563)
@@ -207,5 +207,5 @@
 
     carp($msg);
-    if ($det_id and $iter and not $no_update) {
+    if (defined $det_id and defined $iter and not $no_update) {
 	my $command = "$dettool -addnormalizedstat";
 	$command .= " -det_id $det_id";
Index: trunk/ippScripts/scripts/detrend_norm_exp.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_norm_exp.pl	(revision 16561)
+++ trunk/ippScripts/scripts/detrend_norm_exp.pl	(revision 16563)
@@ -183,5 +183,5 @@
 
     carp($msg);
-    if ($det_id and $iter and not $no_update) {
+    if (defined $det_id and defined $iter and not $no_update) {
 	my $command = "$dettool -addprocessedimfile";
 	$command .= " -det_id $det_id";
Index: trunk/ippScripts/scripts/detrend_process_exp.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_process_exp.pl	(revision 16561)
+++ trunk/ippScripts/scripts/detrend_process_exp.pl	(revision 16563)
@@ -194,5 +194,5 @@
 
     carp($msg);
-    if ($det_id and $exp_id and not $no_update) {
+    if (defined $det_id and defined $exp_id and not $no_update) {
 	my $command = "$dettool -addprocessedexp";
 	$command .= " -det_id $det_id";
Index: trunk/ippScripts/scripts/detrend_process_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_process_imfile.pl	(revision 16561)
+++ trunk/ippScripts/scripts/detrend_process_imfile.pl	(revision 16563)
@@ -173,5 +173,5 @@
 
     carp($msg);
-    if ($det_id and $exp_id and $class_id and not $no_update) {
+    if (defined $det_id and defined $exp_id and defined $class_id and not $no_update) {
 	my $command = "$dettool -addprocessedimfile";
 	$command .= " -det_id $det_id";
Index: trunk/ippScripts/scripts/detrend_reject_exp.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_reject_exp.pl	(revision 16561)
+++ trunk/ippScripts/scripts/detrend_reject_exp.pl	(revision 16563)
@@ -335,5 +335,5 @@
 
     carp($msg);
-    if ($det_id and $iter and not $no_update) {
+    if (defined $det_id and defined $iter and not $no_update) {
 	my $command = "$dettool -adddetrunsummary";
 	$command .= " -det_id $det_id";
Index: trunk/ippScripts/scripts/detrend_reject_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_reject_imfile.pl	(revision 16561)
+++ trunk/ippScripts/scripts/detrend_reject_imfile.pl	(revision 16563)
@@ -544,5 +544,5 @@
 
     carp($msg);
-    if ($det_id and $iter and $exp_id and not $no_update) {
+    if (defined $det_id and defined $iter and defined $exp_id and not $no_update) {
 	my $command = "$dettool -addresidexp";
 	$command .= " -det_id $det_id";
Index: trunk/ippScripts/scripts/detrend_resid.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_resid.pl	(revision 16561)
+++ trunk/ippScripts/scripts/detrend_resid.pl	(revision 16563)
@@ -239,5 +239,5 @@
 
     carp($msg);
-    if ($det_id and $iter and $exp_id and not $no_update) {
+    if (defined $det_id and defined $iter and defined $exp_id and not $no_update) {
 	my $command = "$dettool -addresidimfile";
 	$command .= " -det_id $det_id";
Index: trunk/ippScripts/scripts/detrend_stack.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_stack.pl	(revision 16561)
+++ trunk/ippScripts/scripts/detrend_stack.pl	(revision 16563)
@@ -191,5 +191,5 @@
 
     carp($msg);
-    if ($det_id and $iter and $class_id and not $no_update) {
+    if (defined $det_id and defined $iter and defined $class_id and not $no_update) {
 	my $command = "$dettool -addstacked";
 	$command .= " -det_id $det_id";
Index: trunk/ippScripts/scripts/diff_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/diff_skycell.pl	(revision 16561)
+++ trunk/ippScripts/scripts/diff_skycell.pl	(revision 16563)
@@ -253,5 +253,5 @@
 
     warn($msg);
-    if ($diff_id and not $no_update) {
+    if (defined $diff_id and not $no_update) {
 	my $command = "$difftool -adddiffskyfile -diff_id $diff_id -code $exit_code";
 	$command .= " -dbname $dbname" if defined $dbname;
Index: trunk/ippScripts/scripts/flatcorr_init.pl
===================================================================
--- trunk/ippScripts/scripts/flatcorr_init.pl	(revision 16561)
+++ trunk/ippScripts/scripts/flatcorr_init.pl	(revision 16563)
@@ -199,5 +199,5 @@
 
     carp($msg);
-    if ($dvo_id && $region && $last_step && $status and not $no_update) {
+    if (defined $dvo_id && defined $region && defined $last_step && defined $status and not $no_update) {
         my $command = "$caltool -addcalrun";
 	$command .= " -dvo_id $dvo_id";
Index: trunk/ippScripts/scripts/flatcorr_proc.pl
===================================================================
--- trunk/ippScripts/scripts/flatcorr_proc.pl	(revision 16561)
+++ trunk/ippScripts/scripts/flatcorr_proc.pl	(revision 16563)
@@ -187,5 +187,5 @@
 
     carp($msg);
-    if ($dvo_id && $region && $last_step && $status and not $no_update) {
+    if (defined $dvo_id && defined $region && defined $last_step && defined $status and not $no_update) {
         my $command = "$caltool -addcalrun";
 	$command .= " -dvo_id $dvo_id";
Index: trunk/ippScripts/scripts/magic_tree.pl
===================================================================
--- trunk/ippScripts/scripts/magic_tree.pl	(revision 16561)
+++ trunk/ippScripts/scripts/magic_tree.pl	(revision 16563)
@@ -234,5 +234,5 @@
 
     carp($msg);
-    if ($magic_id and not $no_update) {
+    if (defined $magic_id and not $no_update) {
 	my $command = "$magictool -inputtree";
 	$command .= " -magic_id $magic_id";
Index: trunk/ippScripts/scripts/register_exp.pl
===================================================================
--- trunk/ippScripts/scripts/register_exp.pl	(revision 16561)
+++ trunk/ippScripts/scripts/register_exp.pl	(revision 16563)
@@ -210,5 +210,5 @@
 
     carp($msg);
-    if ($exp_id and not $no_update) {
+    if (defined $exp_id and not $no_update) {
 	my $command = "$regtool -addprocessedexp -exp_id $exp_id -code $exit_code";
 	$command .= " -dbname $dbname" if defined $dbname;
Index: trunk/ippScripts/scripts/register_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/register_imfile.pl	(revision 16561)
+++ trunk/ippScripts/scripts/register_imfile.pl	(revision 16563)
@@ -220,5 +220,5 @@
 
     carp($msg);
-    if ($exp_id && $tmp_class_id and not $no_update) {
+    if (defined $exp_id && defined $tmp_class_id and not $no_update) {
         my $command = "$regtool -addprocessedimfile";
         $command .= " -exp_id $exp_id";
Index: trunk/ippScripts/scripts/stack_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/stack_skycell.pl	(revision 16561)
+++ trunk/ippScripts/scripts/stack_skycell.pl	(revision 16563)
@@ -245,5 +245,5 @@
 
     warn($msg);
-    if ($stack_id and not $no_update) {
+    if (defined $stack_id and not $no_update) {
 	my $command = "$stacktool -addsumskyfile -stack_id $stack_id -code $exit_code";
 	$command .= " -dbname $dbname" if defined $dbname;
Index: trunk/ippScripts/scripts/warp_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/warp_skycell.pl	(revision 16561)
+++ trunk/ippScripts/scripts/warp_skycell.pl	(revision 16563)
@@ -247,5 +247,5 @@
 
     warn($msg);
-    if ($warp_id and $skycell_id and $tess_id and not $no_update) {
+    if (defined $warp_id and defined $skycell_id and defined $tess_id and not $no_update) {
 	my $command = "$warptool -addwarped -warp_id $warp_id -skycell_id $skycell_id -tess_id $tess_id -code $exit_code";
 	$command .= " -dbname $dbname" if defined $dbname;
