Update AvroEventSerializer.java

Add missing check for null