simplify the template and templateUrl check

if (!config.template) and (!!config.templateUrl) aren't both `true` or `false`, throwing error based on xor operation result.