Nullpointer fix in PutBuilder