Check input correctly

Fixes #44

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>