Fix for empty json causing error