Throw exception if parameters to create and update not valid