Check if optional attribute is set in .tf file

I also find it confusing that after .default_branch changed from being null to cty.StringVal(""), the subsequent d.GetOk("default_branch") still returns false.