Add checks as parameter validation

wherever possible!