check for null-termination before consuming it, in bottle serialization