Address code analysis issue

- Had to verify baseUrl correctness before using it in public method
#1556