fixed serialization of null values at partition name

minor: refactored Id class