fix instanceof checking for String