make sure time isn't nil