Fixed a bug.

Fixed an error when running the check command if there are messages in the database without a 'time' parameter.