Dust masses of z > 5 galaxies from SED fitting and ALMA upper limits