Fix NPEs with YMLSerializer