Fix possible QPyNullVariant test expression