ensure numbers are floats (where required) and properly iterate over documents