minor updates on DatatypeLabel

- removed unneeded commas
- changed `throw '...'` to `throw new Error('...')`
added tests for DatatypeLabel