added correct handling for null values in mapper and serializers. updated tests for the same