fix line issue in routes; utilize underscore isundefined