errnil so we can detect nullable values
basic encoding generation