code: public static DataType getDataType(Object v) {
          //NOTE: DO NOT CHANGE THE ORDER OF THE IFS!!!
          if(DataType.BOOLEAN.isInstance(v)) {
              return DataType.BOOLEAN;
          }
          else if(DataType.ORDINAL.isInstance(v)) {
              return DataType.ORDINAL;
          }
          else if(DataType.NUMERICAL.isInstance(v)) {
              return DataType.NUMERICAL;
          }
          else if(DataType.CATEGORICAL.isInstance(v)) {
              return DataType.CATEGORICAL;
          }
          else {
              //We will reach this point ONLY if the value is null. 
              //This is because the last enum value in the loop is Categorical which uses the Object class.
              return null; 
          }
      }
docs: Detects the DataType of a particular value.
  
  @param v
  @return