mesh: fix build() method, was crashing if no fmt is provided.