check tool properties properly, fix #128902
use unequal null instead of strict unequal undefined
Merge pull request #130048 from mauk81/patch-2

check tool properties properly, fix #128902