Parse the value to int. if the value is an int returns an int, else returns null.
null
int? get valueToInt => int.tryParse(value);