Data abstraction, extract method checkNullEndPoints()
Data abstraction, extract method checkSameRoute()
Replace nested conditionals with guard clauses
Replace if-else with guard clause