check parameters
do not rethrow argument errors (just return them), otherwise we 
get unexpected exceptions