discard invalid points (e.g. empty) without throwing errors. add unit tests.