adding if statemet to check if build is an element in jsonobject