Simplified checkRouteParams into one function