Close #57. Return error instead of panic when type of time != float