This function performs a quality control check to ensure that a given field value is an unsigned number (i.e., a non-negative number). Optionally, it can also check if the field value matches a specified data type before performing the unsigned check.
Arguments
- field_value
The value to be checked. The function verifies if this value is non-negative. It can be of any type but is typically expected to be a numeric value.
- expected_type
An optional parameter specifying the expected data type of
field_value
. If provided, the function first checks iffield_value
matches the expected type before verifying if it is unsigned. Default is NULL, which means no type check is performed.