The base url is mandatory. You cannot do a REST call without having a url. So I just make this requirement explicit and that way the baseUrl has to be passed into the constructor. If it's null or empty, an exception is raised. The code is much simpler and cleaner now, without every method having to check or throw BaseUrlNotAssignedException when really this should be dealt with in a single place.