maxDistance and minDistance of Filters.nearSphere overloads are optional but not marked as @Nullable which makes it impossible to pass null values from Kotlin
Example:
public static Bson nearSphere(final String fieldName, final Bson geometry, final Double maxDistance, final Double minDistance)
should be
public static Bson nearSphere(final String fieldName, final Bson geometry, @Nullable final Double maxDistance, }}{{@Nullable }}{{final Double minDistance)