changed uint.is_valid to isValid