public Integer getTypeValue() {
   if (type != null) {
     return type.getValue();
   }
   return null;
 }