We need exact steps to reproduce an issue in order to fix it.
PS version, your OS, Image > Mode, bits per channel, what you do before reading that value and what tool is showing NaN?
Photoshop Version: 24.1 Machine: M1 Mac Mini Operating System: macOS Ventura 13.1 Image Mode: RGB Color, 16 Bits/Channel
I am on the Smudge tool and the brush flow/strength value on photoshop is 40% (arbitrary).
This is what I am doing inside of a brushFlowStrength function (with a exeModal() inside)