OVT-7620: Use typeof instead of isNaN

To verify whether object is a string.