Check if `value` is valid this property in the entity `obj`. Append
        validation results to `errors` (list).

def check(self, obj, value, errors):
        """
        Check if `value` is valid this property in the entity `obj`. Append
        validation results to `errors` (list).

        """
        fieldname = "%s.%s" % (type(obj).__name__, self._name)

        if value is None:
            if not self._null:
                errors.append("%s may not be 'null'" % fieldname)

            # If None, just leave. The rest of checks don't make any sense.
            return

        for has_error in [self._has_wrong_type, self._has_wrong_length,
                          self._is_not_one_of, self._has_subproblems]:
            if has_error(fieldname, value, errors):
                break