Check that the collection exists first before trying to add the route.

Signed-off-by: Jason Lewis <jason.lewis1991@gmail.com>