code: func GetBoolPolicy(d *schema.ResourceData, key string) *types.BoolPolicy {
  	v, e := d.GetOkExists(key)
  	if e {
  		return BoolPolicy(v.(bool))
  	}
  	return nil
  }
docs: // GetBoolPolicy reads a ResourceData and returns an appropriate BoolPolicy for
  // the state of the definition. nil is returned if it does not exist.