Removed null check in serializer