Check buffer/skip size for undefined and NaN.

Manually coerce to 0 if found.  Previously the offset variable would be
corrupted to NaN causing all following word*() functions to mysteriously store
null.