Split up checkParams method