I'd suggest checking whether NumOfBytes+NumOfBytes2 > 0 instead. Otherwise, that looks okay.