trying to fix the null document.get...