Also put json.get() in the "if json is not None" check