Add safety check for Route.startsWith('')

Add safety check for Route.startsWith('')