check for existence in json for codetypes

the json would error if the code did not exist