fix TypeError values is null
Merge pull request #2 from guillaume-uH57J9/master

Better error message and stops crashing, but regex seems to have a problem