fix(serializer): fixed bug where serializer. serialize always returns null
fix(serializer): fixed bug where correct type was not detected and therefore typeSerializer was null