Properly discard invalid timeout values