To support full compatibility to other serializers the TypeSerializer should take care of empty strings as well.

Unit tests are also provided.