Add check for stateParams for course test