Fix some errors that show for empty batches.
Fix some errors that show for empty batches.

Check whether there are Analyses before trying to count them.
Explicitly set errors to false.
Avoid implicit object creation.

cosmolab/chemdb,cosmolab/chemdb,cosmolab/chemdb