Is anyone hit with the fact that Min/Max with na.rm = TRUE will return different class from the input if there are no non-NA values?

In particular scenario I use min with na.rm = TRUE with group_by/summarise on a column which is of type integer. I then found the result is numeric - not integer. because min is returning -Inf for groups with no non-NA values.

Is there a library which gets around this or do I need to put a wrapper function around min?

To be frank I programmed around this in the early days but just letting my integers become numeric - but it doesn't seem right.