Also you can change the order of these checks for efficiency (`hasDeclaredParamsType` should go last)