As stated in the LRM, option shall be used with coverage instances while type_option shall be used once per coverage type.
option.weight = 10;
type_option.comment = "This is a covergroup comment";
If you want to set the weight of a certain coverage instance to 5 relative to this coverage_type you must use:
coverage_type_name coverage_instance_name = new();
coverage_instance_name.option.weight = 5;
If you want to set the weight of this coverage_type relative to total coverage then you must use:
coverage_type_name.type_option.weight = 5;
Also type_option's shall take only constant expressions, while option's can take also variables.