Routes: checking for errors before dereferencing pointer.