fix for when points.length <= 1

This PR fixes cases when there is no points or only one point.

```javascript
simplify([]);
// expected: []
// given: [undefined]

simplify([{x:1,y:2}])
// expected: [{x:1, y:2}]
// given: [{x:1,y:2}, undefined]
```

// Thanks for awesome library!