Throw an error unless enough parameters are given