$baseUrl is always !== null