added more argument checks for incorrect input

Signed-off-by: Stefan Venz <ikstream86@gmail.com>