catch possible TypeError and ValueError from serializer
add test to show TypeError can occur