Better change this method to accept a TimeValue instead. Then you do not have to check such things.