Avoid misinterpretation of parameter if after SetBinary SetNull is set. Also check memory allocation.