Cython/validators

Avoid some C API functions where not needed in trait validators.