[Runtime] do comparison not asignment in if statement

Subtle typo fix.

(cherry picked from commit 2398e9b387b91ccd99336cbae3928c3ddb4f118c)