Can I query is_continuous about a JuMP model?

Yes, this is a good idea. It can also simplify this function you wrote