smoother checking of passed parameters