Determine if a String can be parsed to LocalDateTime or Int
(Disclamer: I only know Kotlin theoretically)

You can avoid the second try/catch by using String.toIntOrNull instead of String.toInt.

And by extracting the LocalDateTime conversion into a separate function, that also returns null when it fails (which also would help fulfill the single responsibility principle), you could then use a functional approach with the safe call operator (?.), the Elvis operator (?:) and the run extension method:

enum class RangeValueType {
    INT,
    DATE,
    STRING
}

fun parseLocalDateTime(value: String): LocalDateTime? {
    try {
        return LocalDateTime.parse(value)
    } catch (dtpe: DateTimeParseException) {
        return null;
    }
}

fun parseValue(value: String): Pair&lt;RangeValueType, Any&gt; {
    return parseLocalDateTime(value)?.run { Pair(RangeValueType.DATE, this) } ?:
             value.toIntOrNull()?.run { Pair(RangeValueType.INT, this) } ?: 
             value.run { Pair(RangeValueType.STRING, this) } 
}


Runable version 

(NB: enum constants should be written all capitalized so they are not confused with types.)