Check typeof time, fixes #10