Fix geometry parser for empty fields

Check buffer length in geometry parser, to avoid

    Uncaught RangeError: Trying to access beyond buffer length

if field value is empty.

closes #742