Added error checks to time and error classes.