Determine whether viewport is floating or not?

Is there a way to determine whether a viewport is floating or not in a script?

Thank you!