Changes type annotation in Route constructor to only recieve object or string.