How to check type of the value

In Grafana I have 3 useful variables to use in the flux query: v.timeRangeStart, v.timeRangeStop and v.windowPeriod. Obviously, I should be able to calculate the number of data points in the result of aggregation using the given range start/stop and the window period. But the problem is that both v.timeRangeStart and v.timeRangeStop may be of either duration or time type. I can’t simply do the calculation not knowing the types of operands.
I couldn’t find a way in the flux language to query the type of value and do branching based on the result. Is it feasible?
Thank you.

@void This isn’t currently possible in Flux, but there is work going in to this as we speak, and it should be available soon. Unfortunately, I don’t have an exact timeline.