Implementing tests and fixing issues found, see #1

- implementing test for DefaultTypeMapperImpl
- adding additional NPE guards