Throw errors for negative or non-finite time and/or duration values.

Fix issue #354.