NilClass to_bson optimization, and object allocation stats