Added id check to createUI methods

Setting the id needed to check whether the id is a valid object id
(greater than 0)