Use types instead of strings in json types dict. Fix check for null