Wouldn't this result in a console.error?

getBaseURL : function(method) {

      if (typeof method === "undefined"){

        console.error("Incorrect use of getBaseURL");

      }