Insert empty range checks

When empty range with null is provided, we need to check first
since pcmpxstrx doesn't take null pointers.
Merge pull request #5 from Constellation/check-empty-range

Insert empty range checks