Added checkRoute function to check if a route is defined into router