Fixed the wrong endpoint value check when no endpoint is set in config.