It is moved out if this if statement "if (args && args.type && this.options.hasOwnProperty(args.type)) {"
because we still need to set the endpoint in the _storeArgs even if a type is not set, so for example in public communities you do not need to set a type, because public is the default community grid. But if you wanted to create a public community grid and set the endpoint to be smart cloud , you would have an endpoint parameter but no type parameter , therefore the endpoint will not get set because we are checking to see if  there is a type parameter, then setting the endpoint in the _storeArgs.