update slider, add nan check

Fix the bug will cause  crash when set `maximum` to 0 of **`PYSlider`**