code: @TargetApi(Build.VERSION_CODES.HONEYCOMB)
      public static int getType(Cursor cursor, String columnName) {
          if (cursor == null) {
              return Cursor.FIELD_TYPE_NULL;
          }
  
          return cursor.getType(cursor.getColumnIndex(columnName));
      }
docs: Checks the type of the column.
  @see android.database.Cursor#getType(int).
  @see android.database.Cursor#getColumnIndex(String).
  @param cursor the cursor.
  @param columnName the column name.
  @return the type of the column.