Added NULL route check