check for fist == last before dereferencing first
Merge pull request #59 from aiche/fix/parse_nan_deref_end-#6955

Check for first == last before dereferencing first