check for json decode null first in methods