Cope better with null / zero-length data.