Removed instanceof checks for the injected serializer
Catch symfony serializer exceptions