fun <reified J : JsonElement> getAsOrNull(index: Int): J?
Returns index-th element of an array as J or null if element is missing or has different type
null